Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Issue #2 #3

Merged
merged 6 commits into from
Aug 3, 2022
Merged

Bugfix: Issue #2 #3

merged 6 commits into from
Aug 3, 2022

Conversation

elainehoml
Copy link
Collaborator

tl;dr

Replace previous subprocess.run tests for the oneimgfrc CLI with unittest.mocks.

Fixes Issue #2

Description of changes

Replaced the previous subprocess.run tests for the CLI as these tests failed with Github actions, though they worked when run locally.

Now the tests for CLI use unittest.mock, which simulate what would happen if sys.argv was set to the command list that was previously passed to subprocess.run.

For example,

running the following in the terminal

oneimgfrc img1.tif 3 --unit nm -ts 0

can be passed to sys.argv as a list (len=7) in a mock patch.

@elainehoml elainehoml linked an issue Aug 3, 2022 that may be closed by this pull request
@elainehoml elainehoml merged commit 2ca848e into main Aug 3, 2022
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.

Tests on the one image FRC CLI fail
1 participant