Skip to content

Conversation

@dave3d
Copy link
Member

@dave3d dave3d commented Feb 25, 2025

The tests were changed to launch with the python executable and run in the comment_spell_check subdir.

The tests were changed to launch with the python executable and
run in the comment_spell_check subdir.
@dave3d dave3d requested a review from zivy March 3, 2025 16:19
Copy link
Member

@zivy zivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look OK, but the testing approach using subprocess is less standard and should be changed. Usually the entry point method to the script is defined as a regular function, like here and then invoked when the script is run. This allows for passing arguments to the method for debugging and more standard usage of pytest with the pytest.mark.parametrize fixture, like here. This would change the current pytest code from multiple independent tests to a single tests with multiple parameterizations and no calls to subprocess.

@dave3d
Copy link
Member Author

dave3d commented Mar 3, 2025

These changes look OK, but the testing approach using subprocess is less standard and should be changed. Usually the entry point method to the script is defined as a regular function, like here and then invoked when the script is run. This allows for passing arguments to the method for debugging and more standard usage of pytest with the pytest.mark.parametrize fixture, like here. This would change the current pytest code from multiple independent tests to a single tests with multiple parameterizations and no calls to subprocess.

Yeah, I did it that way in my dicom2stl repo, and at some point it'll probably change it here too. That's just more work that I'm putting off for now. This is older code that I'm gradually improving.

@dave3d dave3d merged commit dab4e11 into main Mar 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants