Skip to content

Commit 8a1651f

Browse files
committed
update README
1 parent 5d5af1f commit 8a1651f

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
# Unit Tests Practice
44

5-
#### This repo explores a wide range of testing techniques — mocking, fixtures, test-class inheritance, a simulated HTTP server and continuous integration — using simple multiple-choice quizzes stored as JSON. It also compares the automated tests through unittest and pytest, and was also my first steps with Markdown documentation.
5+
This repo explores a wide range of testing techniques — mocking, fixtures, test-class inheritance, a simulated HTTP server and continuous integration — using simple multiple-choice quizzes stored as JSON, and compares the automated tests through unittest and pytest.
66

7-
## Overview
7+
It was also my first steps with Markdown documentation.
8+
9+
### Overview
810

911
| Program | Role |
1012
|---|---|
@@ -16,7 +18,7 @@ The test suite is the heart of the project: it stacks several techniques on a si
1618

1719
---
1820

19-
## Installation
21+
### Installation
2022

2123
```bash
2224
python -m venv venv
@@ -25,29 +27,29 @@ pip install -r requirements.txt # to use questionnaire.py only
2527
pip install -r requirements-dev.txt # to use questionnaire_unit_tests.py
2628
```
2729

28-
## questionnaire_import.py : Import and convert online quizzes into json_questionnaires
30+
### Import and convert online quizzes into json_questionnaires
2931
>python3 ./questionnaire_import.py
3032
3133
More info : [questionnaire_import.md](./questionnaire_import.md)
3234

3335
---
3436

35-
## questionnaire.py : Displays the quiz in argument and counts the number of good answers
37+
##Displays the quiz in argument and counts the number of good answers
3638
>python3 ./questionnaire.py ./json_questionnaires/<questionnaire.json>
3739
3840
More info : [questionnaire.md](./questionnaire.md)
3941

4042
---
4143

42-
## questionnaire_unit_tests.py : Run the tests with `unittest` or `pytest`
43-
# use ./json_test_files folder to check 25 intentionally broken quizzes targeting error cases
44+
### Run the tests with `unittest` or `pytest`
45+
use ./json_test_files folder to check 25 intentionally broken quizzes targeting error cases
4446
>python3 -m unittest questionnaire_unit_test.py ./json_test_files/<questionnaire.json>
4547
>pytest -v questionnaire_unit_test.py -s ./json_test_files/<questionnaire.json>
4648
4749
More info : [questionnaire_unit_test.md](./questionnaire_unit_test.md)
4850

4951

50-
## Testing highlights
52+
### Testing highlights
5153

5254
- **Test-class inheritance** to reuse base cases by changing a single parameter.
5355
- **Mocking** with `unittest.mock.patch` to simulate `sys.argv`.
@@ -57,21 +59,21 @@ More info : [questionnaire_unit_test.md](./questionnaire_unit_test.md)
5759
compare both frameworks directly.
5860

5961

60-
## Continuous integration
62+
### Continuous integration
6163

6264
GitHub Actions runs on every push and pull request to `master`: dependency install
6365
(Python 3.10), `flake8` lint, then the test suite under both `unittest` and `pytest`.
6466

6567
---
6668

67-
## [Requirements](./requirements.txt)
69+
### [Requirements](./requirements.txt)
6870
- Python 3.10+
6971
- jsonschema==4.17.0
7072
- parameterized==0.8.1
7173
- requests==2.28.1
7274
- validators==0.20.0
7375

74-
## [Requirements-dev](./requirements-dev.txt)
76+
### [Requirements-dev](./requirements-dev.txt)
7577
- pytest==7.2.0
7678
- flake8==6.0.0
7779

0 commit comments

Comments
 (0)