mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Make importlib.test.source.util.write_bytecode reset sys.dont_write_bytecode.
This commit is contained in:
parent
e866206302
commit
f2b55fb5ee
1 changed files with 5 additions and 1 deletions
|
@ -14,7 +14,11 @@ def writes_bytecode(fxn):
|
||||||
if sys.dont_write_bytecode:
|
if sys.dont_write_bytecode:
|
||||||
return lambda *args, **kwargs: None
|
return lambda *args, **kwargs: None
|
||||||
else:
|
else:
|
||||||
return fxn
|
def wrapper(*args, **kwargs):
|
||||||
|
to_return = fxn(*args, **kwargs)
|
||||||
|
sys.dont_write_bytecode = False
|
||||||
|
return to_return
|
||||||
|
return wrapper
|
||||||
|
|
||||||
|
|
||||||
def bytecode_path(source_path):
|
def bytecode_path(source_path):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue