← Back to team overview

testtools-dev team mailing list archive

[Bug 689149] [NEW] TestCase.assertIsInstance doesn't take optional msg

 

Public bug reported:

Python2.7 has a optional "msg" argument to TestCase.assertIsInstance,
and TestCase.assertDictEqual relies on this:

  File "/usr/lib/python2.7/unittest/case.py", line 807, in assertDictEqual
    self.assertIsInstance(d1, dict, 'First argument is not a dictionary')
TypeError: assertIsInstance() takes exactly 3 arguments (4 given)

The signature of assertIsInstance is:

    def assertIsInstance(self, obj, cls, msg=None):

** Affects: testtools
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of testtools
developers, which is subscribed to testtools.
https://bugs.launchpad.net/bugs/689149

Title:
  TestCase.assertIsInstance doesn't take optional msg

Status in testtools:
  New

Bug description:
  Python2.7 has a optional "msg" argument to TestCase.assertIsInstance, and TestCase.assertDictEqual relies on this:

  File "/usr/lib/python2.7/unittest/case.py", line 807, in assertDictEqual
    self.assertIsInstance(d1, dict, 'First argument is not a dictionary')
TypeError: assertIsInstance() takes exactly 3 arguments (4 given)

The signature of assertIsInstance is:

    def assertIsInstance(self, obj, cls, msg=None):





Follow ups

References