Skip to content

Commit

Permalink
Turn warnings into errors to avoid regression over #2990
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarnoud committed Oct 15, 2020
1 parent 64a7c05 commit 664281e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions testsuite/MDAnalysisTests/core/test_accumulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ def test_total_charge_compounds(self, group, name, compound):
ref = [sum(a.charges) for a in group.atoms.groupby(name).values()]
assert_almost_equal(group.total_charge(compound=compound), ref)

@pytest.mark.filterwarnings( # Prevents regression of issue #2990
"error:"
"Using a non-tuple sequence for multidimensional indexing is deprecated:"
"FutureWarning"
)
def test_total_charge_duplicates(self, group):
group2 = group + group[0]
ref = group.total_charge() + group[0].charge
Expand All @@ -133,6 +138,11 @@ def test_total_mass_compounds(self, group, name, compound):
ref = [sum(a.masses) for a in group.atoms.groupby(name).values()]
assert_almost_equal(group.total_mass(compound=compound), ref)

@pytest.mark.filterwarnings( # Prevents regression of issue #2990
"error:"
"Using a non-tuple sequence for multidimensional indexing is deprecated:"
"FutureWarning"
)
def test_total_mass_duplicates(self, group):
group2 = group + group[0]
ref = group.total_mass() + group2[0].mass
Expand Down

0 comments on commit 664281e

Please sign in to comment.