Kaydet (Commit) 0f1afb1d authored tarafından Tim Peters's avatar Tim Peters

test_module_with_large_stack(): This failed when Python was run with -O,

trying to delete a .pyc file that didn't exist (it needed to delete .pyo
then).
üst 06727123
......@@ -88,7 +88,7 @@ def test_module_with_large_stack(module):
f.write(']')
f.close()
# compile & remove .py file, we only need .pyc
# compile & remove .py file, we only need .pyc (or .pyo)
f = open(filename, 'r')
py_compile.compile(filename)
f.close()
......@@ -102,6 +102,9 @@ def test_module_with_large_stack(module):
# cleanup
del sys.path[-1]
os.unlink(module + '.pyc')
for ext in '.pyc', '.pyo':
fname = module + ext
if os.path.exists(fname):
os.unlink(fname)
test_module_with_large_stack('longlist')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment