From 1de74c630847782e08db090c0d0a0c19724c8472 Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 29 Jun 2024 10:04:03 +0200 Subject: [PATCH] chore: remove nosetests from tests and docs fix #499 --- docs/options.md | 10 ++-------- test/test_testing.py | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/options.md b/docs/options.md index 0a87b2dc6..946c8ee98 100644 --- a/docs/options.md +++ b/docs/options.md @@ -1383,9 +1383,6 @@ Platform-specific environment variables are also available:
!!! tab examples "Environment variables" ```yaml - # Run the project tests against the installed wheel using `nose` - CIBW_TEST_COMMAND: nosetests {project}/tests - # Run the package tests using `pytest` CIBW_TEST_COMMAND: pytest {package}/tests @@ -1402,9 +1399,6 @@ Platform-specific environment variables are also available:
```toml [tool.cibuildwheel] - # Run the project tests against the installed wheel using `nose` - test-command = "nosetests {project}/tests" - # Run the package tests using `pytest` test-command = "pytest {package}/tests" @@ -1510,7 +1504,7 @@ Platform-specific environment variables are also available:
CIBW_TEST_REQUIRES: pytest # Install specific versions of test dependencies - CIBW_TEST_REQUIRES: nose==1.3.7 moto==0.4.31 + CIBW_TEST_REQUIRES: pytest==8.2.2 packaging==24.1 ``` !!! tab examples "pyproject.toml" @@ -1522,7 +1516,7 @@ Platform-specific environment variables are also available:
# Install specific versions of test dependencies [tool.cibuildwheel] - test-requires = ["nose==1.3.7", "moto==0.4.31"] + test-requires = ["pytest==8.2.2", "packaging==24.1"] ``` In configuration files, you can use an array, and the items will be joined with a space. diff --git a/test/test_testing.py b/test/test_testing.py index 2f2a366f1..b415fd403 100644 --- a/test/test_testing.py +++ b/test/test_testing.py @@ -135,8 +135,8 @@ def test_failing_test(tmp_path): project_dir, output_dir=output_dir, add_env={ - "CIBW_TEST_REQUIRES": "nose", - "CIBW_TEST_COMMAND": "nosetests {project}/test", + "CIBW_TEST_REQUIRES": "pytest", + "CIBW_TEST_COMMAND": f"{utils.invoke_pytest()} {{project}}/test", # manylinux1 has a version of bash that's been shown to have # problems with this, so let's check that. "CIBW_MANYLINUX_I686_IMAGE": "manylinux1",