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

Tests for frame extraction #24

Merged
merged 32 commits into from
Mar 1, 2024
Merged

Tests for frame extraction #24

merged 32 commits into from
Mar 1, 2024

Conversation

sfmig
Copy link
Collaborator

@sfmig sfmig commented Aug 15, 2023

Integration tests for frame extraction.

Closes #15

@sfmig sfmig force-pushed the smg/frame-extraction-tests branch 2 times, most recently from 79ba955 to e48e1be Compare February 26, 2024 19:13
@sfmig sfmig changed the title Tests for frame extraction script Tests for frame extraction Feb 26, 2024
@sfmig sfmig marked this pull request as ready for review February 27, 2024 17:40
Copy link
Member

@samcunliffe samcunliffe left a comment

Choose a reason for hiding this comment

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

All looks good. 🫐

My comments are mostly questions. I have no substantive comments on the tests themselves.

  • You're missing a few test_flibble() -> None: typehints. Don't know if they're important in tests but you have some typehints just not everywhere.
  • The file is quite long. Is there a smart way to break it up? Things that come to mind:
    • Remove Parameters from the docstrings for tests?
    • Make more explicit test function names so you can do away with docstrings altogether?!
    • cough longer line length cough in the linter.

tests/test_integration/test_frame_extraction.py Outdated Show resolved Hide resolved
tests/test_integration/test_frame_extraction.py Outdated Show resolved Hide resolved
tests/test_integration/test_frame_extraction.py Outdated Show resolved Hide resolved
tests/test_integration/test_frame_extraction.py Outdated Show resolved Hide resolved
@sfmig
Copy link
Collaborator Author

sfmig commented Mar 1, 2024

thanks for the feedback @samcunliffe!
I reduced the length of the tests file by:

  • reducing docstrings in fixtures and tests,
  • factoring out the fixtures, and
  • using parametrisation to combine the tests that run the CLI app with and without CLI inputs.

I think it looks a bit more neat, with the caveat that now I am using the mocked app in both test cases, so in one case (the empty CLI args case) I'm unnecessarily detaching from the real use case. Let me know any thoughts!

@sfmig sfmig merged commit 300bef3 into main Mar 1, 2024
6 checks passed
@sfmig sfmig deleted the smg/frame-extraction-tests branch March 1, 2024 13:19
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.

Add frame extraction tests
2 participants