diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-07 20:45:42 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-07 20:45:42 (GMT) |
commit | 1c1130fb5f14f22f7e27bea3f4421b3983ae0381 (patch) | |
tree | a4bf1494bd1aa80aae607254c55554e6e836ce1e /Lib/test/test_traceback.py | |
parent | 5665301baea21200771829516fc8edeec3b059b9 (diff) | |
download | cpython-1c1130fb5f14f22f7e27bea3f4421b3983ae0381.zip cpython-1c1130fb5f14f22f7e27bea3f4421b3983ae0381.tar.gz cpython-1c1130fb5f14f22f7e27bea3f4421b3983ae0381.tar.bz2 |
Issue #25783: Fixed test_traceback when run directly (without regrtest).
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r-- | Lib/test/test_traceback.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index b4b74d3..49cedda 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -688,8 +688,12 @@ class TestFrame(unittest.TestCase): class TestStack(unittest.TestCase): def test_walk_stack(self): - s = list(traceback.walk_stack(None)) - self.assertGreater(len(s), 10) + def deeper(): + return list(traceback.walk_stack(None)) + s1 = list(traceback.walk_stack(None)) + s2 = deeper() + self.assertEqual(len(s2) - len(s1), 1) + self.assertEqual(s2[1:], s1) def test_walk_tb(self): try: |