Skip to content

Commit

Permalink
fix pytest expected failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian Jamasb committed Jul 8, 2024
1 parent 5a4bee3 commit 77cc989
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion biopandas/mmcif/tests/test_read_mmcif.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ def test_read_pdb_with_pathlib():
# assert ppdb.code == "4eiy", ppdb.code


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_get_exceptions():
ppdb = PandasMmcif()
ppdb.read_mmcif(TESTDATA_FILENAME)
Expand Down
6 changes: 3 additions & 3 deletions biopandas/mmcif/tests/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ def test_equal():
assert r == 0.000, r


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_wrong_arg():
PandasMmcif.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_incompatible():
PandasMmcif.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s=None)


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_invalid_query():
PandasMmcif.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")

Expand Down
6 changes: 3 additions & 3 deletions biopandas/mmtf/tests/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ def test_equal():
assert r == 0.000, r


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_wrong_arg():
PandasMmtf.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_incompatible():
PandasMmtf.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s=None)


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_invalid_query():
PandasMmtf.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")

Expand Down
6 changes: 3 additions & 3 deletions biopandas/pdb/tests/test_gyradius.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ def test_atom_and_hetatm():
assert rg == expected_rg, f"Expected {expected_rg}, got {rg} instead"


@pytest.mark.xfail(KeyError)
@pytest.mark.xfail(raises=KeyError)
def test_wrong_record_name():
p1t48.gyradius(("Wrong",))


@pytest.mark.xfail(TypeError)
@pytest.mark.xfail(raises=TypeError)
def test_wrong_arg_type():
p1t48.gyradius(5)

Expand All @@ -60,7 +60,7 @@ def test_negative_decimals():
assert rg == expected_rg, f"Expected {expected_rg}, got {rg} instead"


@pytest.mark.xfail(TypeError)
@pytest.mark.xfail(raises=TypeError)
def test_wrong_decimals_arg():
p1t48.gyradius(decimals='five')

Expand Down
6 changes: 3 additions & 3 deletions biopandas/pdb/tests/test_rmsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ def test_equal():
assert r == 0.000, r


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_wrong_arg():
PandasPdb.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_incompatible():
PandasPdb.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s=None)


@pytest.mark.xfail(AttributeError)
@pytest.mark.xfail(raises=AttributeError)
def test_invalid_query():
PandasPdb.rmsd(p1t48.df["ATOM"].loc[1:, :], p1t48.df["ATOM"], s="bla")

Expand Down

0 comments on commit 77cc989

Please sign in to comment.