|
1 | | -Python Asserts |
2 | | -============== |
| 1 | +# Python Asserts |
3 | 2 |
|
4 | 3 | [](https://pypi.python.org/pypi/asserts/) |
5 | 4 | [](https://pypi.python.org/pypi/asserts/) |
6 | 5 | [](https://github.com/srittau/python-asserts/releases/) |
7 | 6 | [](https://pypi.python.org/pypi/asserts/) |
8 | | -[](https://travis-ci.org/srittau/python-asserts) |
| 7 | +[](https://github.com/srittau/python-asserts/actions/workflows/test-and-lint.yml) |
9 | 8 |
|
10 | 9 | Stand-alone Assertions for Python |
11 | 10 |
|
12 | 11 | This package provides a few advantages over the assertions provided by |
13 | 12 | unittest.TestCase: |
14 | 13 |
|
15 | | -* Can be used stand-alone, for example: |
16 | | - * In test cases, not derived from TestCase. |
17 | | - * In fake and mock classes. |
18 | | - * In implementations as rich alternative to the assert statement. |
19 | | -* PEP 8 compliance. |
20 | | -* Custom stand-alone assertions can be written easily. |
21 | | -* Arguably a better separation of concerns, since TestCase is responsible |
| 14 | +- Can be used stand-alone, for example: |
| 15 | + - In test cases, not derived from TestCase. |
| 16 | + - In fake and mock classes. |
| 17 | + - In implementations as rich alternative to the assert statement. |
| 18 | +- PEP 8 compliance. |
| 19 | +- Custom stand-alone assertions can be written easily. |
| 20 | +- Arguably a better separation of concerns, since TestCase is responsible |
22 | 21 | for test running only, if assertion functions are used exclusively. |
23 | 22 |
|
24 | 23 | There are a few regressions compared to assertions from TestCase: |
25 | 24 |
|
26 | | -* The default assertion class (`AssertionError`) can not be overwritten. This |
| 25 | +- The default assertion class (`AssertionError`) can not be overwritten. This |
27 | 26 | is rarely a problem in practice. |
28 | | -* asserts does not support the `addTypeEqualityFunc()` functionality. |
| 27 | +- asserts does not support the `addTypeEqualityFunc()` functionality. |
29 | 28 |
|
30 | 29 | Usage: |
31 | 30 |
|
|
0 commit comments