summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Niemeyer <gustavo@niemeyer.net>2010-09-18 17:45:55 -0300
committerGustavo Niemeyer <gustavo@niemeyer.net>2010-09-18 17:45:55 -0300
commit6f0fe8073bdb5493fd5401537da03798209fbf9c (patch)
treeb91fbec748b95b531224486b6e8ebd6902a4b10c
parentb64f0d59971eaa6f4d48ac3ebbad7eb867bec5f6 (diff)
downloadmocker-6f0fe8073bdb5493fd5401537da03798209fbf9c.tar.gz
Introduced the more natural reading assertIsNotInstance().
-rw-r--r--mocker.py3
-rwxr-xr-xtest.py4
2 files changed, 6 insertions, 1 deletions
diff --git a/mocker.py b/mocker.py
index 7f7a81a..fe135f3 100644
--- a/mocker.py
+++ b/mocker.py
@@ -444,7 +444,8 @@ class MockerTestCase(unittest.TestCase):
assertRaises = failUnlessRaises
assertRaisesRegexp = failUnlessRaisesRegexp
assertIsInstance = failUnlessIsInstance
- assertNotIsInstance = failIfIsInstance
+ assertIsNotInstance = failIfIsInstance
+ assertNotIsInstance = failIfIsInstance # Poor choice in 2.7/3.2+.
# The following are missing in Python < 2.4.
assertTrue = unittest.TestCase.failUnless
diff --git a/test.py b/test.py
index 37ae7b7..a8066c3 100755
--- a/test.py
+++ b/test.py
@@ -1134,6 +1134,10 @@ class MockerTestCaseTest(TestCase):
self.assertEquals(get_method("assertIsInstance"),
get_method("failUnlessIsInstance"))
+ self.assertEquals(get_method("assertIsNotInstance"),
+ get_method("failIfIsInstance"))
+
+ # Poor choice in Python 2.7/3.2+.
self.assertEquals(get_method("assertNotIsInstance"),
get_method("failIfIsInstance"))