Skip to content

Commit 2365035

Browse files
Remove test_zipimport method
Removed the test_zipimport method from test_pdb.py.
1 parent 85716d2 commit 2365035

1 file changed

Lines changed: 0 additions & 32 deletions

File tree

Lib/test/test_pdb.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4013,38 +4013,6 @@ def f(x):
40134013
self.assertIn('42', stdout)
40144014
self.assertIn('return x + 1', stdout)
40154015

4016-
def test_zipimport(self):
4017-
with os_helper.temp_dir() as temp_dir:
4018-
os.mkdir(os.path.join(temp_dir, 'source'))
4019-
zipmodule = textwrap.dedent(
4020-
"""
4021-
def bar():
4022-
pass
4023-
"""
4024-
)
4025-
script = textwrap.dedent(
4026-
f"""
4027-
import sys; sys.path.insert(0, {repr(os.path.join(temp_dir, 'zipmodule.zip'))})
4028-
import foo
4029-
foo.bar()
4030-
"""
4031-
)
4032-
4033-
with zipfile.ZipFile(os.path.join(temp_dir, 'zipmodule.zip'), 'w') as zf:
4034-
zf.writestr('foo.py', zipmodule)
4035-
with open(os.path.join(temp_dir, 'script.py'), 'w') as f:
4036-
f.write(script)
4037-
4038-
stdout, _ = self._run_pdb([os.path.join(temp_dir, 'script.py')], '\n'.join([
4039-
'n',
4040-
'n',
4041-
'b foo.bar',
4042-
'c',
4043-
'p f"break in {$_frame.f_code.co_name}"',
4044-
'q'
4045-
]))
4046-
self.assertIn('break in bar', stdout)
4047-
40484016
def test_issue_59000(self):
40494017
script = """
40504018
def foo():

0 commit comments

Comments
 (0)