From f276a96d84ee5250c134599c129ea6a9e8a1d3a6 Mon Sep 17 00:00:00 2001 From: gengchc2 Date: Thu, 22 Sep 2016 16:09:15 +0800 Subject: Replace assertEqual(None, *) with assertIsNone in tests Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: Ice018dfd3e48326ce9cac58342d03979559b9e82 --- HACKING.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'HACKING.rst') diff --git a/HACKING.rst b/HACKING.rst index 80d58701c6..058dc84162 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -32,6 +32,7 @@ Neutron Specific Commandments - [N343] Production code must not import from neutron.tests.* - [N344] Python 3: Do not use filter(lambda obj: test(obj), data). Replace it with [obj for obj in data if test(obj)]. +- [N345] Detect wrong usage with assertEqual(None, A) and assertEqual(A, None). Creating Unit Tests ------------------- -- cgit v1.2.1