summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-10-07 20:47:17 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2016-10-07 20:47:17 (GMT)
commit250cf81f4a83168f6517fae63f86103530c1f366 (patch)
tree95b5407bdea77cdd188ef1d9b9cb8bae5cfdf8af
parent4c1bb39dc9be68c4d7ed4f60b0b49ccebb2860fd (diff)
parent2b801456fbfe5416d4cb8095e4e8af8ff588abe2 (diff)
downloadcpython-250cf81f4a83168f6517fae63f86103530c1f366.zip
cpython-250cf81f4a83168f6517fae63f86103530c1f366.tar.gz
cpython-250cf81f4a83168f6517fae63f86103530c1f366.tar.bz2
Issue #25783: Fixed test_traceback when run directly (without regrtest).
-rw-r--r--Lib/test/test_traceback.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index f2dc650..7276bc7 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -819,8 +819,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: