Skip to content

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

Closed

Description

@joshuagl

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)

Activity

  1. added
    documentation
    good first issue
    on Jul 13, 2020
  2. added a commit that references this issue on Sep 15, 2020
    1e0a2a3
  3. added a commit that references this issue on Sep 28, 2020
    33be0a6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions