summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bdb.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-03-13 03:57:09 (GMT)
committerLisa Roach <lisaroach14@gmail.com>2019-03-13 03:57:09 (GMT)
commit86900a49000c4a96ad1dc34e49d8af4245b08843 (patch)
treeca1872877872403bc9eb861ecdc602a7051962b9 /Lib/test/test_bdb.py
parent839b925f6347222de560cdb767924c502b4039aa (diff)
downloadcpython-86900a49000c4a96ad1dc34e49d8af4245b08843.zip
cpython-86900a49000c4a96ad1dc34e49d8af4245b08843.tar.gz
cpython-86900a49000c4a96ad1dc34e49d8af4245b08843.tar.bz2
Fix stepping into a frame without a __name__ (GH-12064)
Diffstat (limited to 'Lib/test/test_bdb.py')
-rw-r--r--Lib/test/test_bdb.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py
index 751dd9f..6e82cce 100644
--- a/Lib/test/test_bdb.py
+++ b/Lib/test/test_bdb.py
@@ -730,6 +730,13 @@ class StateTestCase(BaseTestCase):
with TracerRun(self, skip=skip) as tracer:
tracer.runcall(tfunc_import)
+ def test_skip_with_no_name_module(self):
+ # some frames have `globals` with no `__name__`
+ # for instance the second frame in this traceback
+ # exec(compile('raise ValueError()', '', 'exec'), {})
+ bdb = Bdb(skip=['anything*'])
+ self.assertIs(bdb.is_skipped_module(None), False)
+
def test_down(self):
# Check that set_down() raises BdbError at the newest frame.
self.expect_set = [