A test was not guaranteeing cleanup in the face of an exception.
This commit is contained in:
parent
c5605ba144
commit
93220d0df1
|
@ -163,9 +163,10 @@ class ImportTests(unittest.TestCase):
|
||||||
# Need to be able to load from current dir.
|
# Need to be able to load from current dir.
|
||||||
sys.path.append('')
|
sys.path.append('')
|
||||||
|
|
||||||
|
try:
|
||||||
# This used to crash.
|
# This used to crash.
|
||||||
exec('import ' + module)
|
exec('import ' + module)
|
||||||
|
finally:
|
||||||
# Cleanup.
|
# Cleanup.
|
||||||
del sys.path[-1]
|
del sys.path[-1]
|
||||||
unlink(filename + 'c')
|
unlink(filename + 'c')
|
||||||
|
|
Loading…
Reference in New Issue