From 0c77a91d1e8bb60ca75e6a19bc30af76231fa8b5 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Fri, 26 Jul 2024 17:46:15 +0100 Subject: [PATCH] test: Do not write Python bytecode to source directory 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. --- test/util/rpcauth-test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test/util/rpcauth-test.py b/test/util/rpcauth-test.py index 8a7ff26dcb234..931eb80960106 100755 --- a/test/util/rpcauth-test.py +++ b/test/util/rpcauth-test.py @@ -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):