test: fix broken tests and add parser tests (1 to 28 passing)#51
Merged
ericchansen merged 2 commits intomasterfrom Mar 17, 2026
Merged
test: fix broken tests and add parser tests (1 to 28 passing)#51ericchansen merged 2 commits intomasterfrom
ericchansen merged 2 commits intomasterfrom
Conversation
- Fix test_datatypes.py: call module-level match_mm3_* functions instead of non-existent class methods. Add negative test case. (8 → 9 tests) - Rewrite test_seminario.py: replace missing test/ethane/ fixtures with tests using existing repo data (q2mm_example/amber/Ethane/, rh-seminario/mm3.fld). Add GaussLog, Mol2, MM3 parser tests and Hessian mass-weight roundtrip test. (0 → 11 tests) - Remove CI --ignore flags since both test files now pass - Results: 28 passed, 16 skipped, 1 xfailed Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Python test suite to eliminate previously broken tests and expand coverage for file parsing/mass-weighting logic using committed ethane and MM3 fixture data, and re-enables running the full test suite in CI.
Changes:
- Rewrites
test_seminario.pyto use existingq2mm_example/amber/Ethane/andrh-seminario/fixtures (Gaussian log parsing, mol2 parsing, MM3 parsing, Hessian mass-weighting roundtrip). - Fixes
test_datatypes.pyto call MM3 label-matching helpers as module-level functions and adds negative cases. - Removes pytest
--ignoreflags so all tests run in CI.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
test/test_seminario.py |
Replaces missing-fixture-based tests with new parsing and Hessian mass-weighting tests using committed example data. |
test/test_datatypes.py |
Switches from star import/class-method calls to explicit imports and direct calls; adds negative label-matching assertions. |
.github/workflows/ci.yml |
Runs the full pytest suite (no ignores) across the Python version matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
- Remove unused imports from test_seminario.py (copy, os, logging, linear_algebra, MacroModelLog, seminario, utilities) - Remove unused SEMINARIO_DIR constant - Remove unused MM3 import from test_datatypes.py - Replace random test with deterministic label set (a1..z1) - Add TS.log to skipUnless condition for TestGaussLogParsing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix all broken tests and add new parser tests. Test count: 1 → 28 passing.
Changes
test_datatypes.py (was: 8 failures → now: 9 passing)
self.ff.match_mm3_bond()as class methods, but they're module-level functionsmatch_mm3_bond(),match_mm3_angle(), etc. directlymatch_mm3_bond(' 2')should be False)test_seminario.py (was: 1 failure → now: 11 passing)
test/ethane/directory that was never committedTestGaussLogParsing— parses GS.log and TS.log fromq2mm_example/amber/Ethane/TestMol2Parsing— verifies ethane has 8 atoms and 7 bondsTestMM3FFParsing— parsesrh-seminario/mm3.fld, checks bond/angle paramsTestHessianMassWeighting— mass-weight roundtrip preserves HessianCI
--ignoreflags from pytest — all test files now run cleanTest Results
test_replace_neg_eigenvalue