Skip to content

Commit

Permalink
remove test_hdf5.h5 after test (#309)
Browse files Browse the repository at this point in the history
* remove test_hdf5.h5 after test

* version bump

* different names for test file for each root

* use pytests `tmp_path` fixture to handle the file deletion

---------

Co-authored-by: lukashergt <lthergt@phas.ubc.ca>
  • Loading branch information
AdamOrmondroyd and lukashergt committed Jul 19, 2023
1 parent 6c5e8fc commit cb2759c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
anesthetic: nested sampling post-processing
===========================================
:Authors: Will Handley and Lukas Hergt
:Version: 2.0.0
:Version: 2.0.1
:Homepage: https://github.com/handley-lab/anesthetic
:Documentation: http://anesthetic.readthedocs.io/

Expand Down
2 changes: 1 addition & 1 deletion anesthetic/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.0'
__version__ = '2.0.1'
4 changes: 2 additions & 2 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ def test_regex_escape():
@pytest.mark.parametrize('root', ['pc', 'gd'])
@pytest.mark.skipif(pytables_imported is False,
reason="requires tables package")
def test_hdf5(root):
def test_hdf5(tmp_path, root):
samples = read_chains('./tests/example_data/' + root)
filename = 'test_hdf5.h5'
filename = tmp_path / ('test_hdf5' + root + '.h5')
key = "samples"

with HDFStore(filename) as store:
Expand Down

0 comments on commit cb2759c

Please sign in to comment.