write the data file more safely

This commit is contained in:
Jean-Paul Calderone 2023-01-12 16:56:20 -05:00
parent dd51c7a3f1
commit ed74fdc746

View File

@ -128,8 +128,7 @@ async def test_generate(reactor, request, alice):
FORMATS, FORMATS,
)) ))
results = generate(reactor, request, alice, space) results = generate(reactor, request, alice, space)
with vectors.DATA_PATH.open("w") as f: vectors.DATA_PATH.setContent(safe_dump({
f.write(safe_dump({
"version": "2023-01-03", "version": "2023-01-03",
"vector": [ "vector": [
{ {