mirror of https://github.com/python/cpython.git
gh-95971: Turn @writes_bytecode_files to skip when not running (GH-95972)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 07b5c4699e
)
Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
parent
232a988912
commit
4e78d9482a
|
@ -298,7 +298,7 @@ def writes_bytecode_files(fxn):
|
|||
"""Decorator to protect sys.dont_write_bytecode from mutation and to skip
|
||||
tests that require it to be set to False."""
|
||||
if sys.dont_write_bytecode:
|
||||
return lambda *args, **kwargs: None
|
||||
return unittest.skip("relies on writing bytecode")(fxn)
|
||||
@functools.wraps(fxn)
|
||||
def wrapper(*args, **kwargs):
|
||||
original = sys.dont_write_bytecode
|
||||
|
|
Loading…
Reference in New Issue