Skip to content

Commit

Permalink
add --class-fixtures and --module-fixtures options
Browse files Browse the repository at this point in the history
  • Loading branch information
craigahobbs committed May 25, 2021
1 parent 8bac3f7 commit 3903dae
Show file tree
Hide file tree
Showing 3 changed files with 339 additions and 50 deletions.
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@ unittest-parallel -t . -s tests --coverage-branch
- [Source code on GitHub](https://github.com/craigahobbs/unittest-parallel)


## How it works

unittest-parallel uses Python's built-in unit test discovery to find all test cases in your project.
It then runs all test cases in a Python multi-processing pool of the requested size.

### Class and Module Fixtures

Python's unittest framework supports
[class and module fixtures.](https://docs.python.org/3/library/unittest.html#class-and-module-fixtures)
Use the "--class-fixtures" option to execute class fixtures correctly. Use the "--module-fixtures"
option to execute module fixtures correctly. Note that these options reduce the amount of
parallelism.


## Example output

```
Expand Down Expand Up @@ -112,12 +126,6 @@ coverage options:
```


## How it works

unittest-parallel uses Python's built-in unit test discovery to find all of the TestCase classes in
your project. It then runs all tests in a Python multi-processing pool of the requested size.


## Development

This project is developed using [Python Build](https://github.com/craigahobbs/python-build#readme).
Loading

0 comments on commit 3903dae

Please sign in to comment.