Skip to content

Commit

Permalink
test: Do not write Python bytecode to source directory
Browse files Browse the repository at this point in the history
This change prevents writing `share/rpcauth/__pycache__/*.pyc`, which is
especially useful for out-of-source builds when the source directory is
supposed to be read-only.
  • Loading branch information
hebasto committed Jul 26, 2024
1 parent 66ad3e3 commit 9ab34f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/util/rpcauth-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def setUp(self):
with open(config_path, encoding="utf8") as config_file:
config.read_file(config_file)
sys.path.insert(0, os.path.dirname(config['environment']['RPCAUTH']))
sys.dont_write_bytecode = True
self.rpcauth = importlib.import_module('rpcauth')

def test_generate_salt(self):
Expand Down

0 comments on commit 9ab34f2

Please sign in to comment.