From 7dbc6e44e724857b0a1fbefecc0e20e65dd892ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4rsson?= Date: Mon, 1 Jun 2026 22:12:54 +0200 Subject: [PATCH 1/4] docs: Use the proper codecov URLs --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1b81f96..69b1012 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Injector - Python dependency injection framework, inspired by Guice =================================================================== [![CI](https://github.com/python-injector/injector/actions/workflows/ci.yml/badge.svg)](https://github.com/python-injector/injector/actions/workflows/ci.yml) -[![Coverage Status](https://codecov.io/gh/python-injector/injector/branch/master/graph/badge.svg)](https://codecov.io/gh/alecthomas/injector) +[![Coverage Status](https://codecov.io/gh/python-injector/injector/branch/master/graph/badge.svg)](https://app.codecov.io/gh/python-injector/injector) Introduction ------------ From bc0b08a1e79fa2c1a46e44cd03212e415574e019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4rsson?= Date: Tue, 2 Jun 2026 12:56:24 +0200 Subject: [PATCH 2/4] ci: Require 90% code coverage Primarily to catch if the coverage accidentally falls to 0%. --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 7c0b6fd..cf7ece3 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,3 @@ [pytest] -addopts = -v --tb=native --doctest-glob=*.md --doctest-modules --cov-report term --cov-report html --cov-report xml --cov=injector --cov-branch +addopts = -v --tb=native --doctest-glob=*.md --doctest-modules --cov-report term --cov-report html --cov-report xml --cov=injector --cov-branch --cov-fail-under=90 norecursedirs = __pycache__ *venv* .git build From f91e09dbc67615925a6b3b6b8c32065841e40b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4rsson?= Date: Mon, 1 Jun 2026 22:13:30 +0200 Subject: [PATCH 3/4] ci: Fix coverage reporting By adding the current working directory to the `sys.path`, which happens when there is a `conftest.py` file in the root. --- conftest.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 conftest.py diff --git a/conftest.py b/conftest.py new file mode 100644 index 0000000..e69de29 From 3342c6661fedc4a64b7c4fc56d57fa080960cadd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A4rsson?= Date: Wed, 3 Jun 2026 14:54:40 +0200 Subject: [PATCH 4/4] ci(refactor): Use `pytest` instead of `py.test` --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 52d84ff..beb247d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: pip install . - name: Run tests run: | - py.test -vv --cov=injector --cov-branch --cov-report html --cov-report term + pytest -vv --cov=injector --cov-branch --cov-report html --cov-report term if which mypy; then mypy injector ; fi if which black; then black --check . ; fi check-manifest