Skip to content

Commit

Permalink
Fix warning in test
Browse files Browse the repository at this point in the history
  • Loading branch information
padix-key committed Jul 23, 2024
1 parent 242e554 commit 69ddfc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/test_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import glob
import itertools
import warnings
from os.path import join
import biotite.structure as struc
import biotite.structure.info as info
Expand Down Expand Up @@ -218,7 +219,11 @@ def test_original_mask(path):
)
ref_model = ref_model[ref_model.element != "H"]

hydrogenated_model, original_mask = hydride.add_hydrogen(ref_model)
with warnings.catch_warnings():
# Ignore warnings about unknown bond types,
# as they may appear in inter-residue bonds
warnings.simplefilter("ignore")
hydrogenated_model, original_mask = hydride.add_hydrogen(ref_model)
test_model = hydrogenated_model[original_mask]

assert hydrogenated_model.array_length() > ref_model.array_length()
Expand Down

0 comments on commit 69ddfc2

Please sign in to comment.