diff options
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_datastructures.py | 2 | ||||
| -rw-r--r-- | tests/utils_tests/test_http.py | 4 | ||||
| -rw-r--r-- | tests/utils_tests/test_simplelazyobject.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/utils_tests/test_datastructures.py b/tests/utils_tests/test_datastructures.py index 5563a0fc4f..7984837053 100644 --- a/tests/utils_tests/test_datastructures.py +++ b/tests/utils_tests/test_datastructures.py @@ -49,7 +49,7 @@ class SortedDictTests(SimpleTestCase): self.d2[7] = 'lucky number 7' self.assertEqual(list(six.iterkeys(self.d2)), [1, 9, 0, 7]) - if not six.PY3: + if six.PY2: def test_change_keys(self): """ Changing the keys won't do anything, it's only a copy of the diff --git a/tests/utils_tests/test_http.py b/tests/utils_tests/test_http.py index 581eb1dcd7..f68ac33503 100644 --- a/tests/utils_tests/test_http.py +++ b/tests/utils_tests/test_http.py @@ -115,12 +115,12 @@ class TestUtilsHttp(unittest.TestCase): # reciprocity works for n in [0, 1, 1000, 1000000]: self.assertEqual(n, http.base36_to_int(http.int_to_base36(n))) - if not six.PY3: + if six.PY2: self.assertEqual(sys.maxint, http.base36_to_int(http.int_to_base36(sys.maxint))) # bad input self.assertRaises(ValueError, http.int_to_base36, -1) - if not six.PY3: + if six.PY2: self.assertRaises(ValueError, http.int_to_base36, sys.maxint + 1) for n in ['1', 'foo', {1: 2}, (1, 2, 3), 3.141]: self.assertRaises(TypeError, http.int_to_base36, n) diff --git a/tests/utils_tests/test_simplelazyobject.py b/tests/utils_tests/test_simplelazyobject.py index f16b5e4da1..8dd427e86a 100644 --- a/tests/utils_tests/test_simplelazyobject.py +++ b/tests/utils_tests/test_simplelazyobject.py @@ -181,7 +181,7 @@ class TestUtilsSimpleLazyObject(TestCase): pickled = pickle.dumps(x, 1) pickled = pickle.dumps(x, 2) - if not six.PY3: + if six.PY2: import cPickle # This would fail with "TypeError: expected string or Unicode object, NoneType found". |
