File tree Expand file tree Collapse file tree 7 files changed +23
-6
lines changed Expand file tree Collapse file tree 7 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 6464 - name : Run unit tests with green
6565 run : |
6666 export FLASK_APP=service:app
67- pytest --disable-warnings
67+ pytest --pspec --cov=service --cov-fail-under=95 -- disable-warnings
6868 env :
6969 DATABASE_URI : " postgresql://postgres:pgs3cr3t@postgres:5432/testdb"
7070
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ lint: ## Run the linter
2626
2727test : # # Run the unit tests
2828 $(info Running tests...)
29- pytest --disable-warnings
29+ green -vvv --processes=1 --run-coverage --termcolor --minimum-coverage=95
3030
3131# #@ Runtime
3232
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ python-dotenv==1.0.0
66pytest == 7.4.0
77pytest-pspec == 0.0.4
88pytest-cov == 4.1.0
9+ green == 3.4.3
910
1011# Code quality
1112pylint == 2.17.5
Original file line number Diff line number Diff line change 11[tool:pytest]
22minversion = 6.0
3- addopts = --pspec --cov =. --disable-warnings
3+ addopts = --pspec --cov =. --cov-fail-under =95 -- disable-warnings
44testpaths =
55 tests
66 integration
@@ -10,3 +10,11 @@ show_missing = True
1010
1111[pylint.'MESSAGES CONTROL']
1212disable =E1101
13+
14+ [green]
15+ verbose =3
16+ processes =1
17+ run-coverage =1
18+ termcolor =1
19+ # minimum-coverage=95
20+ # junit-report=./unittests.xml
Original file line number Diff line number Diff line change 55- The API must be RESTful.
66- The endpoint must be called `/counters`.
77- When creating a counter, you must specify the name in the path.
8- - Duplicate names must return a conflict error code.
8+ - Duplicate names must return a 409 conflict error code.
99- The service must be able to update a counter by name.
1010- The service must be able to get a counter's current value.
1111- The service must be able to delete a counter.
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ black==23.7.0
2121pytest == 7.4.0
2222pytest-pspec == 0.0.4
2323pytest-cov == 4.1.0
24-
24+ green == 3.4.3
2525factory-boy == 3.3.0
2626coverage == 7.3.0
2727
Original file line number Diff line number Diff line change 11# setup configuration for tools
22[tool:pytest]
33minversion = 6.0
4- addopts = --pspec --cov =service --disable-warnings
4+ addopts = --pspec --cov =service --cov-fail-under =95 -- disable-warnings
55testpaths =
66 tests
77 integration
88
9+ [green]
10+ verbose =3
11+ processes =1
12+ run-coverage =1
13+ termcolor =1
14+ minimum-coverage =95
15+ # junit-report=./unittests.xml
16+
917[flake8]
1018max-line-length = 127
1119per-file-ignores =
You can’t perform that action at this time.
0 commit comments