Minimal refactor tests#42
Merged
Merged
Conversation
…flow. incomplete work skip ci.
marcuscollins
approved these changes
Mar 1, 2026
marcuscollins
left a comment
Collaborator
There was a problem hiding this comment.
A couple minor things to think about for the future maybe, otherwise LGTM.
|
|
||
|
|
||
| @pytest.fixture | ||
| def pdb_base_dir(): |
Collaborator
There was a problem hiding this comment.
Does this need to be a fixture? It will certainly work, but it will call os.environ.get every time you want to get what is essentially a constant.
Collaborator
Author
There was a problem hiding this comment.
good point. a new commit will make a constant first, and just wrap it in a fixture to not affect the existing test functions.
| @pytest.fixture | ||
| def pdb_path(pdb_base_dir): | ||
| """Factory fixture that resolves a PDB path, skipping if missing.""" | ||
| def _resolve(pdb_id: str) -> str: |
Collaborator
There was a problem hiding this comment.
Unless you need pdb_base_dir to be a fixture, I would simplify this by creating a constant that is generated once at initialization, e.g. PDB_BASE_DIR and then use that in this method. Then you don't need the method to return a function.
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.
This PR changes the
teststo prepare for PR #39 that sets up build workflow and helps clean up dependencies.Changes are minimal. Functionally, the main change is replacing a hard-coded data file path with a relative one. This involves moving the
test_filesfolder insidetest. Aconftest.pyscript is added to reduce some boiler plates on fixture.