Skip to content

Document how to run individual unit tests or test suites #1076

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

Closed
joshuagl opened this issue Jul 13, 2020 · 0 comments
Closed

Document how to run individual unit tests or test suites #1076

joshuagl opened this issue Jul 13, 2020 · 0 comments
Labels
documentation Documentation of the project as well as procedural documentation good first issue Bite-sized items for first time contributors

Comments

@joshuagl
Copy link
Member

joshuagl commented Jul 13, 2020

In order to help contributors figure out how to effectively test their changes we should add some additional recommendations for running the unit tests to our contributor testing docs

To the question "why not use tox": the tox setup seems a little broken to me as there's no way to run a single test because the default environment runs coverage... I've tried to write a new environment config for that but it becomes a little clunky. Calling "python3 -m unittest" seems fine to me: I just didn't know it

FYI, you can run unittest-powerd modules/classes/tests directly like so:

python test_repository_tool.py # Runs all test cases (classes) in that test suite (module)
python test_repository_tool.py TestRepository # Runs all tests (functions) in TestRepository test case
python test_repository_tool.py TestRepository.test_writeall # Runs test_writeall test only

Originally posted by @lukpueh in #1067 (comment)

@joshuagl joshuagl added documentation Documentation of the project as well as procedural documentation good first issue Bite-sized items for first time contributors labels Jul 13, 2020
MVrachev pushed a commit to MVrachev/tuf that referenced this issue Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation of the project as well as procedural documentation good first issue Bite-sized items for first time contributors
Projects
None yet
Development

No branches or pull requests

1 participant