Skip to content

Commit

Permalink
Merge pull request #250 from Becksteinlab/update-pandas-testing
Browse files Browse the repository at this point in the history
use pandas.testing.assert_frame_equal
  • Loading branch information
orbeckst authored Sep 14, 2023
2 parents 11f0daf + c408802 commit 05c3625
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
8 changes: 6 additions & 2 deletions tests/fileformats/top/test_amber03star.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

7 changes: 5 additions & 2 deletions tests/fileformats/top/test_amber03w.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
7 changes: 6 additions & 1 deletion tests/fileformats/top/top.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 05c3625

Please sign in to comment.