Skip to content

Commit 9573401

Browse files
committed
Tidy up a bit
1 parent 9e568f6 commit 9573401

File tree

3 files changed

+14
-15
lines changed

3 files changed

+14
-15
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ jobs:
253253
run: |
254254
# We use pytest-xdist to make this run much faster.
255255
# The downside is that we cannot use -s / --capture=no.
256+
#
257+
# We use coverage to collect coverage data but we currently
258+
# do not upload / use it because combining Windows and Linux
259+
# coverage is challenging.
260+
#
261+
# We therefore have a few ``# pragma: no cover`` statements.
256262
uv run --extra=dev \
257263
coverage run \
258264
--parallel-mode \
@@ -267,15 +273,6 @@ jobs:
267273
env:
268274
UV_PYTHON: ${{ matrix.python-version }}
269275

270-
# - name: Upload coverage data
271-
# uses: actions/upload-artifact@v4
272-
# with:
273-
# name: coverage-data-windows-${{ matrix.python-version }}
274-
# path: .coverage.*
275-
# include-hidden-files: true
276-
# if-no-files-found: error
277-
278-
# Coverage combination and enforcement
279276
coverage:
280277
name: Combine & check coverage
281278
needs: [ci-tests, skip-tests, windows-tests]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ optional-dependencies.dev = [
5252
"actionlint-py==1.7.7.23",
5353
"check-manifest==0.50",
5454
"check-wheel-contents==0.6.3",
55+
"coverage==7.10.7",
5556
"deptry==0.23.1",
5657
"dirty-equals==0.10.0",
5758
"doc8==1.1.1",
@@ -72,7 +73,6 @@ optional-dependencies.dev = [
7273
"pyright==1.1.406",
7374
"pyroma==5.0",
7475
"pytest==8.4.2",
75-
"pytest-cov==7.0.0",
7676
"pytest-retry==1.7.0",
7777
"pytest-xdist==3.8.0",
7878
"python-dotenv==1.1.1",

tests/mock_vws/test_docker.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ def fixture_custom_bridge_network() -> Iterator[Network]:
6565
name = "test-vws-bridge-" + uuid.uuid4().hex
6666
try:
6767
network = client.networks.create(name=name, driver="bridge")
68-
except NotFound:
68+
# We skip coverage here because combining Windows and Linux coverage
69+
# is challenging.
70+
except NotFound: # pragma: no cover
6971
# On Windows the "bridge" network driver is not available and we use
7072
# the "nat" driver instead.
7173
network = client.networks.create(name=name, driver="nat")
@@ -116,15 +118,15 @@ def test_build_and_run(
116118
target="target-manager",
117119
rm=True,
118120
)
119-
except BuildError as exc:
121+
# We skip coverage here because combining Windows and Linux coverage
122+
# is challenging.
123+
except BuildError as exc: # pragma: no cover
120124
full_log = "\n".join(
121125
[item["stream"] for item in exc.build_log if "stream" in item],
122126
)
123127
# If this assertion fails, it may be useful to look at the other
124128
# properties of ``exc``.
125-
if (
126-
"no matching manifest for windows/amd64" not in exc.msg
127-
): # pragma: no cover
129+
if "no matching manifest for windows/amd64" not in exc.msg:
128130
raise AssertionError(full_log) from exc
129131
pytest.skip(
130132
reason="We do not currently support using Windows containers."

0 commit comments

Comments
 (0)