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):
fname = f"tests/testdata/{name}.json"
if os.path.exists(fname):
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:
with open(fname, 'w') as fh:
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