fix tests that fail to close files that they open #1435
Labels
good next issue
An issue that should be ready to resolve.
python
Pull requests that update Python code
testing
There are several tests in
test_lca.py
that are causing warnings during the tests, because I did a bad thing and opened files without closing them.The three tests are:
and they all use some variant of this code,
which doesn't close the file. This results in a warning when py.test runs the tests.
The proper usage is something like
which will use a context manager to close the file after the
with
block.Fix!
The text was updated successfully, but these errors were encountered: