mirror of
https://github.com/python/cpython.git
synced 2024-11-28 20:33:54 +08:00
Issue #25783: Fixed test_traceback when run directly (without regrtest).
This commit is contained in:
parent
5665301bae
commit
1c1130fb5f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user