tests: built-in exceptions live in a different module in 3.x

This commit is contained in:
David Wilson 2018-06-26 03:20:25 +01:00
parent cbcd8267d1
commit 826c477061
1 changed files with 3 additions and 1 deletions

View File

@ -29,7 +29,9 @@ class ConstructorTest(unittest2.TestCase):
def test_form_base_exc(self): def test_form_base_exc(self):
ve = SystemExit('eek') ve = SystemExit('eek')
e = self.klass(ve) e = self.klass(ve)
self.assertEquals(e[0], 'exceptions.SystemExit: eek') self.assertEquals(e.args[0],
# varies across 2/3.
'%s.%s: eek' % (type(ve).__module__, type(ve).__name__))
def test_from_exc_tb(self): def test_from_exc_tb(self):
try: try: