|
1 |
| -# Python-Unittest-Koans # |
| 1 | +# Python-Unittest-Koans |
2 | 2 |
|
3 |
| -Python [Testing Koans](http://blog.code-cop.org/2015/12/testing-koans.html) to understand how to write unit tests with [unittest](https://docs.python.org/2/library/unittest.html). |
| 3 | +Python [Testing Koans](https://blog.code-cop.org/2015/12/testing-koans.html) to understand how to write unit tests with [unittest](https://docs.python.org/2/library/unittest.html). |
4 | 4 |
|
5 |
| -## Dependencies ## |
| 5 | +## Dependencies |
6 | 6 |
|
7 |
| -This is a Python project. It is compatible with both Python 2 and 3. |
| 7 | +This is a Python project. It is compatible with both Python 2 and 3. |
8 | 8 | Required dependencies are listed in [`requirements.txt`](requirements.txt).
|
9 | 9 |
|
10 |
| -Additional exercises cover [parameterized](https://github.com/wolever/parameterized), |
| 10 | +Additional exercises cover [parameterized](https://github.com/wolever/parameterized), |
11 | 11 | [PyHamcrest](https://github.com/hamcrest/PyHamcrest) and
|
12 |
| -[assertpy](https://github.com/ActivisionGameScience/assertpy). |
13 |
| -Run `pip install -r requirements.txt` to install the required packages. |
| 12 | +[assertpy](https://github.com/ActivisionGameScience/assertpy). |
| 13 | +Run `pip install -r requirements.txt` to install the required packages. |
14 | 14 | Alternatively the dependencies are available in the `packages` folder.
|
15 | 15 |
|
16 |
| -## Assignment ## |
| 16 | +## Assignment |
17 | 17 |
|
18 | 18 | * Run script `run_tests` (or `python -m unittest discover test`).
|
19 | 19 | * You should see some test failures and errors (but there are no assertions).
|
20 | 20 | * Go through the test code starting from Session 1:
|
21 |
| - * All assertions are commented and incomplete. |
22 |
| - * Uncomment the assertions and complete them making the tests pass. |
23 |
| - * You can run individual sessions using `python -m unittest test.test_session1_greeter` (Note: Unittest looks for modules not files. Make sure to use `test.` not `test/` and no trailing `.py`.) |
24 |
| - |
25 |
| -### License ### |
26 |
| -[New BSD License](http://opensource.org/licenses/bsd-license.php), see `license.txt` in repository. |
| 21 | + * All assertions are commented and incomplete. |
| 22 | + * Uncomment the assertions and complete them making the tests pass. |
| 23 | + * You can run individual sessions using `python -m unittest test.test_session1_greeter` (Note: Unittest looks for modules not files. Make sure to use `test.` not `test/` and no trailing `.py`.) |
0 commit comments