From 4613e3d4488ee24eb95f453f0592c053aff4d9de Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Mon, 4 Sep 2023 21:31:08 -0400 Subject: [PATCH 1/2] use pandas.testing.assert_frame_equal --- tests/fileformats/top/top.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/fileformats/top/top.py b/tests/fileformats/top/top.py index afeed389..89645442 100644 --- a/tests/fileformats/top/top.py +++ b/tests/fileformats/top/top.py @@ -10,7 +10,12 @@ import numpy as np from numpy.testing import assert_array_equal -from pandas.util.testing import assert_frame_equal + +try: + from pandas.testing import assert_frame_equal +except ImportError: + # old versions of pandas + from pandas.util.testing import assert_frame_equal import pytest From c408802d2601747cdbc70e6789bbe54a1c57834a Mon Sep 17 00:00:00 2001 From: Oliver Beckstein Date: Mon, 4 Sep 2023 21:42:33 -0400 Subject: [PATCH 2/2] xfail specific tests (#236) --- tests/fileformats/top/test_amber03star.py | 8 ++++++-- tests/fileformats/top/test_amber03w.py | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/fileformats/top/test_amber03star.py b/tests/fileformats/top/test_amber03star.py index 238deabc..50471e9a 100644 --- a/tests/fileformats/top/test_amber03star.py +++ b/tests/fileformats/top/test_amber03star.py @@ -12,9 +12,13 @@ from .top import TopologyTest from ...datafiles import datafile -@pytest.mark.xfail(gromacs.release().startswith("2022"), - reason="issue https://github.com/Becksteinlab/GromacsWrapper/issues/236") class TestAmber03star(TopologyTest): processed = datafile('fileformats/top/amber03star/processed.top') conf = datafile('fileformats/top/amber03star/conf.gro') molecules = ['Protein', 'SOL', 'IB+', 'CA', 'CL', 'NA', 'MG', 'K', 'RB', 'CS', 'LI', 'ZN'] + + @pytest.mark.xfail(gromacs.release().startswith(("2022", "2023")), + reason="issue #236 https://github.com/Becksteinlab/GromacsWrapper/issues/236") + def test_mdrun(self, tmpdir, low_performance): + super(TestAmber03star, self).test_mdrun(tmpdir, low_performance) + diff --git a/tests/fileformats/top/test_amber03w.py b/tests/fileformats/top/test_amber03w.py index 36ce4286..d1a5ed1f 100644 --- a/tests/fileformats/top/test_amber03w.py +++ b/tests/fileformats/top/test_amber03w.py @@ -12,9 +12,12 @@ from .top import TopologyTest from ...datafiles import datafile -@pytest.mark.xfail(gromacs.release().startswith("2022"), - reason="issue https://github.com/Becksteinlab/GromacsWrapper/issues/236") class TestAmber03w(TopologyTest): processed = datafile('fileformats/top/amber03w/processed.top') conf = datafile('fileformats/top/amber03w/conf.gro') molecules = ['Protein_chain_A', 'SOL', 'IB+', 'CA', 'CL', 'NA', 'MG', 'K', 'RB', 'CS', 'LI', 'ZN'] + + @pytest.mark.xfail(gromacs.release().startswith(("2022", "2023")), + reason="issue #236 https://github.com/Becksteinlab/GromacsWrapper/issues/236") + def test_mdrun(self, tmpdir, low_performance): + super(TestAmber03w, self).test_mdrun(tmpdir, low_performance)