From ff6393386866a0216dea5d0b0f6e988cbef8783a Mon Sep 17 00:00:00 2001 From: Tyler Reddy Date: Wed, 4 Dec 2024 15:08:37 -0700 Subject: [PATCH] TST: PR 4747 revisions * 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 MDAnalysisgh-4744. --- testsuite/MDAnalysisTests/topology/test_itp.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/testsuite/MDAnalysisTests/topology/test_itp.py b/testsuite/MDAnalysisTests/topology/test_itp.py index 81a73cd331..8711ac072a 100644 --- a/testsuite/MDAnalysisTests/topology/test_itp.py +++ b/testsuite/MDAnalysisTests/topology/test_itp.py @@ -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 @@ -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():