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

Refactor tests into utility unit tests and bigger unit tests #115

Open
dandhlee opened this issue Aug 25, 2021 · 2 comments
Open

Refactor tests into utility unit tests and bigger unit tests #115

dandhlee opened this issue Aug 25, 2021 · 2 comments
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@dandhlee
Copy link
Collaborator

dandhlee commented Aug 25, 2021

Googlers see b/206698957.

For functions that are small utility functions, they should be in a separate unit test file since tests/test_unit.py is getting rather large. Will keep using tests/test_unit.py for bigger tests for stuff like checking docstring parsing, but not for utility functions like find_package_group.

@dandhlee dandhlee added type: cleanup An internal cleanup or hygiene concern. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 25, 2021
@dandhlee dandhlee self-assigned this Aug 25, 2021
@dandhlee
Copy link
Collaborator Author

The test filename besides test_unit can be confusing. Let's be careful on naming and not confuse other contributors/reviewers.

Suggestion given: keeping it all in one file or only breaking up by class/type/functionality being tested.

@dandhlee
Copy link
Collaborator Author

In tox.ini file, instead of using python3 -m unittest tests/test_unit.py tests/test_helpers.py tests/test_markdown.py to list out all the files, try https://docs.python.org/3/library/unittest.html#test-discovery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant