diff options
author | Michael Fladischer <FladischerMichael@fladi.at> | 2015-07-28 17:54:54 +0200 |
---|---|---|
committer | Michael Fladischer <FladischerMichael@fladi.at> | 2015-07-29 11:51:09 +0200 |
commit | c97d8fe84bb7ca0b8bfa500f5864e7a3d0c0a75f (patch) | |
tree | eb166387ec76f9cef0b92a11cead6c577e9486ea /mock/tests/testmock.py | |
parent | e34a7cb293a40f03b8d5a5e7d95f60429233c471 (diff) | |
download | mock-c97d8fe84bb7ca0b8bfa500f5864e7a3d0c0a75f.tar.gz |
Use six to detect python2/3 in test modules.
Diffstat (limited to 'mock/tests/testmock.py')
-rw-r--r-- | mock/tests/testmock.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mock/tests/testmock.py b/mock/tests/testmock.py index d956064..ddecfe1 100644 --- a/mock/tests/testmock.py +++ b/mock/tests/testmock.py @@ -4,9 +4,10 @@ import unittest2 as unittest from mock.tests.support import ( - callable, inPy3k, is_instance, next + callable, is_instance, next ) +import six import copy import pickle import sys @@ -663,7 +664,7 @@ class MockTest(unittest.TestCase): copy.copy(Mock()) - @unittest.skipIf(inPy3k, "no old style classes in Python 3") + @unittest.skipIf(six.PY3, "no old style classes in Python 3") def test_spec_old_style_classes(self): class Foo: bar = 7 @@ -677,7 +678,7 @@ class MockTest(unittest.TestCase): self.assertRaises(AttributeError, lambda: mock.foo) - @unittest.skipIf(inPy3k, "no old style classes in Python 3") + @unittest.skipIf(six.PY3, "no old style classes in Python 3") def test_spec_set_old_style_classes(self): class Foo: bar = 7 |