Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a35e56

Browse files
committed
TST: promote most warnings to errors in CI
exp: filter one specific warning
1 parent 865056b commit 5a35e56

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

h5py/tests/test_file2.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ def test_file(self):
172172
finally:
173173
os.remove(fname)
174174

175+
@pytest.mark.filterwarnings(
176+
# on Windows, a resource warning may be emitted
177+
# when this test returns
178+
"ignore:unclosed file:ResourceWarning"
179+
)
175180
def test_TemporaryFile(self):
176181
# in this test, we check explicitly that temp file gets
177182
# automatically deleted upon h5py.File.close()...

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
markers =
33
nonetwork: Tests to skip when no network access
44
filterwarnings =
5-
error::h5py.h5py_warnings.H5pyDeprecationWarning
5+
error
66
required_plugins = pytest-mpi

0 commit comments

Comments
 (0)