diff options
Diffstat (limited to 'packages/meshbay-hub/tests/test_bundle_kdf_parity.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_bundle_kdf_parity.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/meshbay-hub/tests/test_bundle_kdf_parity.py b/packages/meshbay-hub/tests/test_bundle_kdf_parity.py index 27e10d4..c62aace 100644 --- a/packages/meshbay-hub/tests/test_bundle_kdf_parity.py +++ b/packages/meshbay-hub/tests/test_bundle_kdf_parity.py @@ -77,19 +77,19 @@ const argon2 = require(process.argv[3]); def js_hashes(tmp_path_factory): d = tmp_path_factory.mktemp("kdf") harness = d / "harness.cjs" - harness.write_text(_HARNESS) + harness.write_text(_HARNESS, encoding="utf-8") vectors = [ {"username": u, "password": p, "mem": MEM_KIB, "time": TIME_COST, "lanes": LANES} for u in CASES for p in PASSWORDS ] payload = d / "vectors.json" - payload.write_text(json.dumps(vectors)) + payload.write_text(json.dumps(vectors), encoding="utf-8") proc = subprocess.run( ["node", str(harness), str(VENDOR / "argon2.wasm"), str(VENDOR / "argon2.min.js"), str(payload)], - capture_output=True, text=True, timeout=300, + capture_output=True, text=True, encoding="utf-8", timeout=300, ) if proc.returncode != 0: pytest.fail(f"node harness failed:\n{proc.stderr[-2000:]}") @@ -124,7 +124,7 @@ def test_parameters_still_match_the_client(): The numbers live in keyderive.js; this test is the second copy. Tuning one without the other orphans every bundle already written, so make it fail. """ - source = (STATIC / "keyderive.js").read_text() + source = (STATIC / "keyderive.js").read_text(encoding="utf-8") assert f"ARGON2_MEM_KIB = {MEM_KIB}" in source assert f"ARGON2_TIME = {TIME_COST}" in source assert f"ARGON2_LANES = {LANES}" in source |