mirror of
https://github.com/python/cpython
synced 2024-10-14 17:40:01 +00:00
gh-95971: Turn @writes_bytecode_files to skip when not running (#95972)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
parent
4e2bd58af4
commit
07b5c4699e
|
@ -298,7 +298,7 @@ def writes_bytecode_files(fxn):
|
||||||
"""Decorator to protect sys.dont_write_bytecode from mutation and to skip
|
"""Decorator to protect sys.dont_write_bytecode from mutation and to skip
|
||||||
tests that require it to be set to False."""
|
tests that require it to be set to False."""
|
||||||
if sys.dont_write_bytecode:
|
if sys.dont_write_bytecode:
|
||||||
return lambda *args, **kwargs: None
|
return unittest.skip("relies on writing bytecode")(fxn)
|
||||||
@functools.wraps(fxn)
|
@functools.wraps(fxn)
|
||||||
def wrapper(*args, **kwargs):
|
def wrapper(*args, **kwargs):
|
||||||
original = sys.dont_write_bytecode
|
original = sys.dont_write_bytecode
|
||||||
|
|
Loading…
Reference in a new issue