Skip to content

Commit

Permalink
close file descriptor after opening in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Dec 17, 2019
1 parent cd3d69e commit 913e8a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions adaptive/tests/test_learners.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,7 @@ def test_saving(learner_type, f, learner_kwargs):
control._recompute_losses_factor = 1
simple(learner, lambda l: l.npoints > 100)
fd, path = tempfile.mkstemp()
os.close(fd)
try:
learner.save(path)
control.load(path)
Expand Down Expand Up @@ -591,6 +592,7 @@ def test_saving_with_datasaver(learner_type, f, learner_kwargs):

simple(learner, lambda l: l.npoints > 100)
fd, path = tempfile.mkstemp()
os.close(fd)
try:
learner.save(path)
control.load(path)
Expand Down

0 comments on commit 913e8a6

Please sign in to comment.