Skip to content

Commit

Permalink
Merge pull request #314 from dandi/close-file
Browse files Browse the repository at this point in the history
Close a file in a test case
  • Loading branch information
yarikoptic committed Dec 14, 2020
2 parents 8afaaaf + fd13c75 commit cc4a03c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dandi/tests/test_organize.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def c(): # shortcut
# and if we set units and redo -- years should stay unchanged, while other fields change
m = yaml_load(path.read())
m["age"]["units"] = "years"
ruamel.yaml.YAML().dump(m, open(path, "w"))
with open(path, "w") as fp:
ruamel.yaml.YAML().dump(m, fp)

populate_dataset_yml(str(path), metadata[:1])
assert c() == {
Expand Down

0 comments on commit cc4a03c

Please sign in to comment.