"llm/llama.cpp/docs/vscode:/vscode.git/clone" did not exist on "768ab4df541275c05eec5ee5db2f89661302610d"
Unverified Commit a3d99617 authored by Leo Gao's avatar Leo Gao Committed by GitHub
Browse files

Add pytest.approx to version_stable

parent 33ccde86
...@@ -15,7 +15,7 @@ def assert_target(name, ob): ...@@ -15,7 +15,7 @@ def assert_target(name, ob):
fname = f"tests/testdata/{name}.json" fname = f"tests/testdata/{name}.json"
if os.path.exists(fname): if os.path.exists(fname):
with open(fname) as fh: with open(fname) as fh:
assert json.load(fh) == json.loads(json.dumps(ob, sort_keys=True)) assert json.load(fh) == pytest.approx(json.loads(json.dumps(ob, sort_keys=True)))
else: else:
with open(fname, 'w') as fh: with open(fname, 'w') as fh:
json.dump(ob, fh, sort_keys=True) json.dump(ob, fh, sort_keys=True)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment