Skip to content

Commit

Permalink
add coverage and fail rate
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Neagu committed Mar 22, 2024
1 parent c616915 commit 9c34107
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ publish-local: ## push to local throw away registry to test integration
docker push registry:5000/simcore/services/dynamic/$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)
@curl registry:5000/v2/_catalog | jq

.PHONY: install-dev
install-dev: ## run tests in development mode
.PHONY: install-test
install-test: ## install dependencies for testing
pip install -r requirements/test.txt

.PHONY: tests-dev
Expand All @@ -77,7 +77,7 @@ tests-dev: ## run tests in development mode

.PHONY: tests-ci
tests-ci: ## run testds in the CI
.venv/bin/pytest -vvv tests
.venv/bin/pytest -vvv --color=yes --cov-report term --cov=activity_monitor tests

.PHONY: help
help: ## this colorful help
Expand Down
1 change: 1 addition & 0 deletions requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ tornado

pytest
pytest-asyncio
pytest-cov
pytest-mock
requests
requests-mock
Expand Down
9 changes: 8 additions & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
coverage[toml]==7.4.4
# via pytest-cov
exceptiongroup==1.2.0
# via pytest
idna==3.6
Expand All @@ -24,9 +26,12 @@ pytest==8.1.1
# via
# -r requirements/test.in
# pytest-asyncio
# pytest-cov
# pytest-mock
pytest-asyncio==0.23.6
# via -r requirements/test.in
pytest-cov==4.1.0
# via -r requirements/test.in
pytest-mock==3.12.0
# via -r requirements/test.in
requests==2.31.0
Expand All @@ -40,7 +45,9 @@ six==1.16.0
tenacity==8.2.3
# via -r requirements/test.in
tomli==2.0.1
# via pytest
# via
# coverage
# pytest
tornado==6.4
# via -r requirements/test.in
urllib3==2.2.1
Expand Down
4 changes: 4 additions & 0 deletions tests/test_activity_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,7 @@ async def test_activity_monitor_becomes_not_busy(
assert result.status_code == 200
response = result.json()
assert response["seconds_inactive"] > 0


def test_always_fails():
assert False

0 comments on commit 9c34107

Please sign in to comment.