Commits

Philip Jenvey  committed 33f99ec

make this test less brittle

  • Participants
  • Parent commits f07a82d
  • Branches py3k

Comments (0)

Files changed (1)

File lib-python/3.2/test/test_builtin.py

         try:
             raise IndexError
         except:
-            self.assertEqual(len(dir(sys.exc_info()[2])), 4)
-
+            ns = dir(sys.exc_info()[2])
+            for name in 'tb_frame', 'tb_lasti', 'tb_lineno', 'tb_next':
+                self.assertIn(name, ns)
 
     def test_divmod(self):
         self.assertEqual(divmod(12, 7), (1, 5))