mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
Another fix for #1414
This commit is contained in:
parent
f19169f2d5
commit
db4a2ef23a
2 changed files with 5 additions and 2 deletions
|
@ -43,14 +43,18 @@ def fixdir(lst):
|
|||
# from package import * (defined in __init__)
|
||||
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
class TestPkg(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.root = None
|
||||
self.syspath = list(sys.path)
|
||||
self.sysmodules = sys.modules.copy()
|
||||
|
||||
def tearDown(self):
|
||||
sys.path[:] = self.syspath
|
||||
sys.modules.clear()
|
||||
sys.modules.update(self.sysmodules)
|
||||
del self.sysmodules
|
||||
cleanout(self.root)
|
||||
|
||||
def run_code(self, code):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue