File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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():
You can’t perform that action at this time.
0 commit comments