Skip to content

Commit c0cd911

Browse files
committed
Skip failing energy assertion on Windows. [ci skip]
1 parent b0f1a11 commit c0cd911

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

actions/generate_recipe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def generate_recipe(data, features, git_remote, git_branch, git_version, git_num
378378
lines.append(" - if: win")
379379
lines.append(" then: set PYTHONUTF8=1")
380380
lines.append(" else: export PYTHONUTF8=1")
381-
lines.append(" - pytest -svvv --color=yes --runveryslow ./tests")
381+
lines.append(" - pytest -vvv --color=yes --runveryslow ./tests")
382382
lines.append(" files:")
383383
lines.append(" source:")
384384
lines.append(" - tests/")

tests/io/test_grotop.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,7 @@ def test_glycam(tmpdir):
478478
glycan_lj[1].epsilon().value(), rel=1e-3
479479
)
480480

481-
e_orig = mols.energy().value()
482-
e_rt = mols2.energy().value()
483-
print(f"\ntest_glycam (grotop): original energy = {e_orig}, roundtrip energy = {e_rt}")
481+
# The CLJ energy calculation returns NaN for large solvated systems on Windows
482+
# (a separate Windows-specific bug). Skip the energy check on that platform.
484483
if sys.platform != "win32":
485-
assert e_rt == pytest.approx(e_orig, rel=1e-3)
484+
assert mols2.energy().value() == pytest.approx(mols.energy().value(), rel=1e-3)

tests/io/test_prmtop.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,8 +346,7 @@ def test_glycam(tmpdir):
346346
# Before the fix, glycan 1-4 pairs had SCEE=0/SCNB=0, giving zero 1-4
347347
# interactions and a different energy.
348348
mols2 = sr.load(f)
349-
e_orig = mols.energy().value()
350-
e_rt = mols2.energy().value()
351-
print(f"\ntest_glycam (prmtop): original energy = {e_orig}, roundtrip energy = {e_rt}")
349+
# The CLJ energy calculation returns NaN for large solvated systems on Windows
350+
# (a separate Windows-specific bug). Skip the energy check on that platform.
352351
if sys.platform != "win32":
353-
assert e_rt == pytest.approx(e_orig, rel=1e-3)
352+
assert mols2.energy().value() == pytest.approx(mols.energy().value(), rel=1e-3)

0 commit comments

Comments
 (0)