diff --git a/README.rst b/README.rst index 72289ae4..d2847489 100644 --- a/README.rst +++ b/README.rst @@ -2,7 +2,7 @@ anesthetic: nested sampling post-processing =========================================== :Authors: Will Handley and Lukas Hergt -:Version: 2.8.2 +:Version: 2.8.3 :Homepage: https://github.com/handley-lab/anesthetic :Documentation: http://anesthetic.readthedocs.io/ diff --git a/anesthetic/_version.py b/anesthetic/_version.py index 964a32ab..f549cc58 100644 --- a/anesthetic/_version.py +++ b/anesthetic/_version.py @@ -1 +1 @@ -__version__ = '2.8.2' +__version__ = '2.8.3' diff --git a/tests/test_labelled_pandas.py b/tests/test_labelled_pandas.py index 24a852a8..98b1f11c 100644 --- a/tests/test_labelled_pandas.py +++ b/tests/test_labelled_pandas.py @@ -472,8 +472,8 @@ def test_drop_labels(lframe_index): assert nolabels.drop_labels() is not nolabels -def test_read_csv(): - filename = 'mcmc_ldf.csv' +def test_read_csv(tmp_path): + filename = tmp_path / 'mcmc_ldf.csv' lframe = LabelledDataFrame(np.random.rand(3, 3), index=['A', 'B', 'C'], diff --git a/tests/test_reader.py b/tests/test_reader.py index e711dad1..154ca764 100644 --- a/tests/test_reader.py +++ b/tests/test_reader.py @@ -311,22 +311,23 @@ def test_path(root): @pytest.mark.parametrize('root', ['pc', 'gd']) -def test_read_csv(root): +def test_read_csv(tmp_path, root): + filename = tmp_path / f'{root}.csv' samples = read_chains(f'./tests/example_data/{root}') - samples.to_csv(f'{root}.csv') + samples.to_csv(filename) - samples_ = read_csv(f'{root}.csv') + samples_ = read_csv(filename) samples_.root = samples.root assert_frame_equal(samples, samples_) - samples_ = read_csv(f'{root}') + samples_ = read_csv(filename) samples_.root = samples.root assert_frame_equal(samples, samples_) - samples_ = read_chains(f'{root}.csv') + samples_ = read_chains(filename) samples_.root = samples.root assert_frame_equal(samples, samples_) - samples_ = read_chains(f'{root}') + samples_ = read_chains(filename) samples_.root = samples.root assert_frame_equal(samples, samples_) diff --git a/tests/test_weighted_labelled_pandas.py b/tests/test_weighted_labelled_pandas.py index 709bd174..63d77f6c 100644 --- a/tests/test_weighted_labelled_pandas.py +++ b/tests/test_weighted_labelled_pandas.py @@ -4,8 +4,8 @@ import pandas -def test_read_csv(): - filename = 'mcmc_wldf.csv' +def test_read_csv(tmp_path): + filename = tmp_path / 'mcmc_wldf.csv' wlframe = WeightedLabelledDataFrame(np.random.rand(3, 3), index=[0, 1, 2], diff --git a/tests/test_weighted_pandas.py b/tests/test_weighted_pandas.py index b390eeb4..474daa23 100644 --- a/tests/test_weighted_pandas.py +++ b/tests/test_weighted_pandas.py @@ -1008,8 +1008,8 @@ def test_style(mcmc_wdf): ax = mcmc_wdf.plot.scatter_2d('x', 'y', style='c') -def test_read_csv(mcmc_wdf): - filename = 'mcmc_wdf.csv' +def test_read_csv(tmp_path, mcmc_wdf): + filename = tmp_path / 'mcmc_wdf.csv' mcmc_wdf.to_csv(filename) mcmc_wdf_ = read_csv(filename)