41d2454
From 80a6e26650302329fa9aff26efa389bd99e397c5 Mon Sep 17 00:00:00 2001
41d2454
From: Sean McGinnis <sean.mcginnis@gmail.com>
41d2454
Date: Sun, 12 Jan 2020 02:36:28 -0600
41d2454
Subject: [PATCH] Drop use of unittest2
41d2454
41d2454
unittest2 was needed for Python version <= 2.6, so it has not been
41d2454
needed for quite some time now. See unittest2 note on:
41d2454
41d2454
https://docs.python.org/2.7/library/unittest.html
41d2454
41d2454
This replaces unittest2 in favor of the standard unittest package.
41d2454
41d2454
Change-Id: Idd5df4c8068810bbbd2bd5058ca38df9f5416a62
41d2454
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
41d2454
---
41d2454
 lower-constraints.txt                    | 1 -
41d2454
 oslo_log/tests/unit/test_versionutils.py | 5 +++--
41d2454
 2 files changed, 3 insertions(+), 3 deletions(-)
41d2454
41d2454
diff --git a/lower-constraints.txt b/lower-constraints.txt
41d2454
index 3644ce5..c7ca21f 100644
41d2454
--- a/lower-constraints.txt
41d2454
+++ b/lower-constraints.txt
41d2454
@@ -65,6 +65,5 @@ systemd-python==234
41d2454
 testrepository==0.0.20
41d2454
 testtools==2.3.0
41d2454
 traceback2==1.4.0
41d2454
-unittest2==1.1.0
41d2454
 urllib3==1.22
41d2454
 wrapt==1.10.11
41d2454
diff --git a/oslo_log/tests/unit/test_versionutils.py b/oslo_log/tests/unit/test_versionutils.py
41d2454
index 3084914..23ee8d4 100644
41d2454
--- a/oslo_log/tests/unit/test_versionutils.py
41d2454
+++ b/oslo_log/tests/unit/test_versionutils.py
41d2454
@@ -13,11 +13,12 @@
41d2454
 #    License for the specific language governing permissions and limitations
41d2454
 #    under the License.
41d2454
 
41d2454
+import unittest
41d2454
+
41d2454
 import mock
41d2454
 from oslotest import base as test_base
41d2454
 import six
41d2454
 from testtools import matchers
41d2454
-import unittest2
41d2454
 
41d2454
 from oslo_log import versionutils
41d2454
 
41d2454
@@ -247,7 +248,7 @@ class DeprecatedTestCase(test_base.BaseTestCase):
41d2454
                                as_of='Juno',
41d2454
                                remove_in='Kilo')
41d2454
 
41d2454
-    @unittest2.skipIf(
41d2454
+    @unittest.skipIf(
41d2454
         six.PY3,
41d2454
         'Deprecated exception detection does not work for Python 3')
41d2454
     @mock.patch('oslo_log.versionutils.report_deprecated_feature')
41d2454
-- 
41d2454
2.20.1
41d2454