Browse code

Don't use packaged unittest2

Let pip install unittest2; pip installation can conflict with the
packaged version.

We should not need work-arounds for the installed broken version of
unittest2 any more (even though this was only for python2.6, which I
doubt anyone is actually using for devstack work anyway)

Cherry-picked from b0595235a2374451c3f899fb893ad989a74b04d1
Partial-Bug: #1430592

Conflicts:
files/rpms-suse/general
files/rpms/general

Change-Id: If6239eab4fe9d63fd1a368e02d88fd57a825b217

Ian Wienand authored on 2015/03/11 10:04:49
Showing 4 changed files
1 1
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-diff -r b2efb7df637b discover.py
2
-+++ b/discover.py	Thu Nov 28 12:02:19 2013 +0000
3
-@@ -82,7 +82,11 @@
4
-     """
5
-     testMethodPrefix = 'test'
6
-     sortTestMethodsUsing = cmp
7
--    suiteClass = unittest.TestSuite
8
-+    try:
9
-+        import unittest2
10
-+        suiteClass = unittest2.TestSuite
11
-+    except ImportError:
12
-+        suiteClass = unittest.TestSuite
13
-     _top_level_dir = None
14
- 
15
-     def loadTestsFromTestCase(self, testCaseClass):
... ...
@@ -16,7 +16,6 @@ psmisc
16 16
 python-cmd2 # dist:opensuse-12.3
17 17
 python-pylint
18 18
 python-setuptools # instead of python-distribute; dist:sle11sp2
19
-python-unittest2
20 19
 screen
21 20
 tar
22 21
 tcpdump
... ...
@@ -15,7 +15,6 @@ psmisc
15 15
 pylint
16 16
 python-setuptools
17 17
 python-prettytable # dist:rhel6 [1]
18
-python-unittest2
19 18
 python-virtualenv
20 19
 python-devel
21 20
 screen
... ...
@@ -180,11 +180,4 @@ if [[ $DISTRO =~ (rhel6) ]]; then
180 180
     # work unmolested.
181 181
     sudo ln -sf /usr/bin/nosetests1.1 /usr/local/bin/nosetests
182 182
 
183
-    # workaround for https://code.google.com/p/unittest-ext/issues/detail?id=79
184
-    install_package python-unittest2 patch
185
-    pip_install discover
186
-    (cd /usr/lib/python2.6/site-packages/; sudo patch <"$FILES/patches/unittest2-discover.patch" || echo 'Assume already applied')
187
-    # Make sure the discover.pyc is up to date
188
-    sudo rm /usr/lib/python2.6/site-packages/discover.pyc || true
189
-    sudo python -c 'import discover'
190 183
 fi