There was an error while loading. Please reload this page.
1 parent 78c4307 commit d82d33fCopy full SHA for d82d33f
tests/test_core.py
@@ -694,11 +694,8 @@ def test_json_ready_models():
694
j = bdb.backends['cgpm'].json_ready_models(bdb, pop_id, gen_id)
695
for m in j["models"]:
696
assert len(m["clusters"]) > 0
697
-
698
# This is handy debugging code (lets you look at the model)
699
- # that can be enabled manually when needed
700
- if True:
701
- import json
702
- path = "/tmp/models.json"
703
- with open(path, 'w') as outfile:
704
- json.dump(j, outfile, indent=2)
+ # that can be enabled manually when needed.
+ with tempfile.NamedTemporaryFile(
+ prefix='bayeslite-models', delete=False) as f:
+ json.dump(j, f, indent=2)
0 commit comments