From 7e0c44e21fa387f8fa681e257bf8abebfdc29177 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 10 Jan 2020 16:28:13 +0000 Subject: Remove references to unittest2 library Library "unittest2" has not released a new version since Jun 30 2015 [1]. Neutron should remove the references to this library and point to "unittest" instead. [1] https://pypi.org/project/unittest2/#history Change-Id: I7d55adc262280c0c2f13b9b81ecc582e1729afa0 Closes-Bug: #1859190 --- HACKING.rst | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'HACKING.rst') diff --git a/HACKING.rst b/HACKING.rst index 0036a99c6c..19b0098170 100644 --- a/HACKING.rst +++ b/HACKING.rst @@ -21,7 +21,6 @@ Below you can find a list of checks specific to this repository. - [N331] Detect wrong usage with assertTrue(isinstance()). - [N332] Use assertEqual(expected_http_code, observed_http_code) instead of assertEqual(observed_http_code, expected_http_code). -- [N334] Use unittest2 uniformly across Neutron. - [N340] Check usage of .i18n (and neutron.i18n) - [N341] Check usage of _ from python builtins - [N343] Production code must not import from neutron.tests.* @@ -46,9 +45,7 @@ without the patch and passes with the patch. All unittest classes must ultimately inherit from testtools.TestCase. In the Neutron test suite, this should be done by inheriting from -neutron.tests.base.BaseTestCase. If the third party unittest library has to -be used directly then it is recommended to use unittest2 as it contains bug -fixes to unittest for all versions of Python prior to version 3.5. +neutron.tests.base.BaseTestCase. All setUp and tearDown methods must upcall using the super() method. tearDown methods should be avoided and addCleanup calls should be preferred. -- cgit v1.2.1