Skip to content

Commit

Permalink
Add a test which catches the current failure
Browse files Browse the repository at this point in the history
  • Loading branch information
jennyfothergill committed Sep 28, 2021
1 parent 9c5ce3b commit 4afda4c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions planckton/tests/test_hydrogen_removal.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from os import path, remove

import pytest
import unyt as u

from planckton.compounds import COMPOUND
Expand All @@ -8,10 +9,11 @@
from planckton.sim import Simulation


def test_hydrogen_removal():
pcbm = Compound(COMPOUND["PCBM-gaff"])
@pytest.mark.parametrize("compound_name", COMPOUND.keys())
def test_hydrogen_removal(compound_name):
comp = Compound(COMPOUND[compound_name])
packer = Pack(
pcbm,
comp,
ff=FORCEFIELD["gaff-custom"],
n_compounds=2,
density=0.1 * u.g / u.cm ** 3,
Expand All @@ -20,6 +22,7 @@ def test_hydrogen_removal():

system = packer.pack()
assert 1 not in [a.atomic_number for a in system.atoms]
assert len(system.atoms) != comp.n_particles * 2


def test_hydrogen_removal_and_sim():
Expand Down

0 comments on commit 4afda4c

Please sign in to comment.