Closed sbraz closed 3 weeks ago
Thanks! I think this is quite straight-forward, but can you post the command you're using to run the tests and what exact warning do you get related to these?
You can try something like pytest -Wdefault aeidon/test/test_encodings.py
and you will see the warnings with the master branch.
Oh, right. I've been using
export PYTEST_ADDOPTS="-p no:cacheprovider -p no:hypothesispytest -p no:warnings"
in my ~/.profile
, probably because of excessive warnings from GTK.
It's this:
aeidon/test/test_encodings.py::TestModule::test_detect_bom__utf_8_sig
/home/osmo/Source/gaupol/aeidon/test/test_encodings.py:199: ResourceWarning: unclosed file <_io.BufferedWriter name='/tmp/gaupol-lll8hiun.srt'>
open(path, "wb").write(codecs.BOM_UTF8 + blob)
This might have been around for quite a while. I remember I left those open intentionally to squeeze three lines (open, write, close) into one. That was before with
was added to the language. This is fine to fix now.
Hi @otsaloma, I noticed tests showed a lot of warnings so I attempted to fix those related to filehandles. Please let me know if I made any mistake, especially when I touched files that are not only used for tests.