diff options
-rw-r--r-- | lib/spack/spack/test/cmd/test.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/spack/spack/test/cmd/test.py b/lib/spack/spack/test/cmd/test.py index 89831b6cb8..a696424c17 100644 --- a/lib/spack/spack/test/cmd/test.py +++ b/lib/spack/spack/test/cmd/test.py @@ -256,9 +256,11 @@ def test_hash_change(mock_test_stage, mock_packages, mock_archive, mock_fetch, outfile = os.path.join(testdir, 'test_suite.lock') with open(outfile, 'r') as f: output = f.read() + val_replace = '"full_hash": "{0}"'.format( + spack.store.db.query('printing-package')[0].full_hash()) changed_hash = output.replace( - spack.store.db.query('printing-package')[0].full_hash(), - 'fakehash492ucwhwvzhxfbmcc45x49ha') + val_replace, + '"full_hash": "fakehash492ucwhwvzhxfbmcc45x49ha"') with open(outfile, 'w') as f: f.write(changed_hash) |