Skip to content

Commit 339ef68

Browse files
committed
adding membrane component to tests
1 parent f367b8e commit 339ef68

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/openfecli/tests/commands/test_plan_rbfe_network.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
ligand_network_planning,
2020
lomap_scorers,
2121
)
22-
from openfe.tests.conftest import T4_protein_component, T4_protein_component_pdb
22+
from openfe.tests.conftest import (
23+
T4_protein_component,
24+
T4_protein_component_pdb,
25+
a2a_protein_membrane_component,
26+
a2a_protein_membrane_pdb,
27+
)
2328
from openfecli.commands.plan_rbfe_network import plan_rbfe_network, plan_rbfe_network_main
2429

2530
from ..utils import assert_click_success
@@ -85,15 +90,18 @@ def validate_charges(smc):
8590
@pytest.mark.skipif(
8691
HAS_OPENEYE, reason="cannot use NAGL with rdkit backend when OpenEye is installed"
8792
)
88-
def test_plan_rbfe_network_main(T4_protein_component):
93+
@pytest.mark.parametrize(
94+
"protein_fixture", ["T4_protein_component", "a2a_protein_membrane_component"]
95+
)
96+
def test_plan_rbfe_network_main(request, protein_fixture):
8997

9098
with resources.as_file(resources.files("openfe.tests.data.openmm_rfe")) as d:
9199
smallM_components = [
92100
SmallMoleculeComponent.from_sdf_file(d / f) for f in ["ligand_23.sdf", "ligand_55.sdf"]
93101
]
94-
protein_component = T4_protein_component
95-
102+
protein_component = request.getfixturevalue(protein_fixture)
96103
solvent_component = SolventComponent()
104+
97105
alchemical_network, ligand_network = plan_rbfe_network_main(
98106
mapper=[LomapAtomMapper()],
99107
mapping_scorer=lomap_scorers.default_lomap_score,
@@ -137,14 +145,12 @@ def yaml_nagl_settings():
137145
"""
138146

139147

140-
@pytest.mark.skipif(
141-
not HAS_NAGL,
142-
reason="needs NAGL",
143-
)
148+
@pytest.mark.skipif(not HAS_NAGL, reason="needs NAGL")
144149
@pytest.mark.skipif(
145150
HAS_OPENEYE, reason="cannot use NAGL with rdkit backend when OpenEye is installed"
146151
)
147-
def test_plan_rbfe_network(mol_dir_args, protein_args, tmp_path, yaml_nagl_settings):
152+
@pytest.mark.parametrize("protein_fixture", ["protein_args"])
153+
def test_plan_rbfe_network(mol_dir_args, request, protein_fixture, tmp_path, yaml_nagl_settings):
148154
"""
149155
smoke test
150156
"""
@@ -153,7 +159,7 @@ def test_plan_rbfe_network(mol_dir_args, protein_args, tmp_path, yaml_nagl_setti
153159
with open(settings_path, "w") as f:
154160
f.write(yaml_nagl_settings)
155161

156-
args = mol_dir_args + protein_args
162+
args = mol_dir_args + request.getfixturevalue(protein_fixture)
157163
expected_output_always = [
158164
"RBFE-NETWORK PLANNER",
159165
"Protein: ProteinComponent(name=)",
@@ -223,10 +229,7 @@ def test_plan_rbfe_network_n_repeats(mol_dir_args, protein_args, input_n_repeat,
223229
pytest.param(False, id="No overwrite"),
224230
],
225231
)
226-
@pytest.mark.skipif(
227-
not HAS_NAGL,
228-
reason="needs NAGL",
229-
)
232+
@pytest.mark.skipif(not HAS_NAGL, reason="needs NAGL")
230233
@pytest.mark.skipif(
231234
HAS_OPENEYE, reason="cannot use NAGL with rdkit backend when OpenEye is installed"
232235
)
@@ -383,10 +386,7 @@ def lomap_yaml_settings():
383386
"""
384387

385388

386-
@pytest.mark.skipif(
387-
not HAS_NAGL,
388-
reason="needs NAGL",
389-
)
389+
@pytest.mark.skipif(not HAS_NAGL, reason="needs NAGL")
390390
@pytest.mark.skipif(
391391
HAS_OPENEYE, reason="cannot use NAGL with rdkit backend when OpenEye is installed"
392392
)

0 commit comments

Comments
 (0)