mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
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
84a26e114e
commit
146232f8af
1 changed files with 1 additions and 1 deletions
|
|
@ -307,7 +307,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…
Add table
Add a link
Reference in a new issue