Skip to content

Commit

Permalink
TST: PR 4747 revisions
Browse files Browse the repository at this point in the history
* Add a regression test that serves the dual purpose of ensuring
that the `no_deprecated_call` decorator behaves properly when
the warning category is `None`, and also enforces our intended
warnings behavior for the element guessing changes in gh-4744.
  • Loading branch information
tylerjereddy committed Dec 4, 2024
1 parent cdc7870 commit ff63933
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testsuite/MDAnalysisTests/topology/test_itp.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import numpy as np
from numpy.testing import assert_allclose, assert_equal

from MDAnalysisTests.util import no_deprecated_call
from MDAnalysisTests.topology.base import ParserBase
from MDAnalysisTests.datafiles import (
ITP, # GROMACS itp
Expand Down Expand Up @@ -490,6 +491,8 @@ def test_missing_elements_no_attribute():
u = mda.Universe(ITP_atomtypes)
with pytest.raises(AttributeError):
_ = u.atoms.elements
with no_deprecated_call():
mda.Universe(ITP_atomtypes)


def test_elements_deprecation_warning():
Expand Down

0 comments on commit ff63933

Please sign in to comment.