Skip to content

Commit a12c042

Browse files
committed
Changed the exception to something portable (Py2 vs Py3).
1 parent ae5a9cb commit a12c042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ def test_complex_miss(self):
7171
class FormatTracebackTestCase(unittest.TestCase):
7272
def test_format_traceback(self):
7373
try:
74-
raise IOError("Because we need an exception.")
74+
raise ValueError("Because we need an exception.")
7575
except:
7676
exc_info = sys.exc_info()
7777
result = format_traceback(exc_info)
7878
self.assertTrue(result.startswith('Traceback (most recent call last):\n'))
7979
self.assertFalse(result.endswith('\n'))
8080
lines = result.split('\n')
8181
self.assertTrue(len(lines) > 3)
82-
self.assertEqual(lines[-1], 'OSError: Because we need an exception.')
82+
self.assertEqual(lines[-1], 'ValueError: Because we need an exception.')

0 commit comments

Comments
 (0)