testtools: Merge in new upstream.
[nivanova/samba-autobuild/.git] / lib / testtools / testtools / tests / test_testtools.py
index 2845730f9f7c179016208b95a1d6f455fc4c2fdc..2e722e919d8b6d3b33640a9ed8d05938f249daf2 100644 (file)
@@ -375,6 +375,10 @@ class TestAssertions(TestCase):
             '42 is not an instance of %s' % self._formatTypes([Foo, Bar]),
             self.assertIsInstance, 42, (Foo, Bar))
 
+    def test_assertIsInstance_overridden_message(self):
+        # assertIsInstance(obj, klass, msg) permits a custom message.
+        self.assertFails("foo", self.assertIsInstance, 42, str, "foo")
+
     def test_assertIs(self):
         # assertIs asserts that an object is identical to another object.
         self.assertIs(None, None)