Skip to content

Commit 4956dd5

Browse files
committed
test: run unit tests for each built wheel
1 parent 628fe81 commit 4956dd5

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ dependency-versions = "pinned"
1111
environment = {LIBGIT2_VERSION="1.9.1", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.3.3", LIBGIT2="/project/ci"}
1212

1313
before-all = "sh build.sh"
14+
test-command = "pytest"
15+
test-sources = ["test"]
16+
before-test = "pip install -r {project}/requirements-test.txt"
1417

1518
[tool.cibuildwheel.linux]
1619
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"

test/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@
3030
import sys
3131

3232
cwd = os.getcwd()
33-
sys.path.remove(cwd)
34-
sys.path.append(cwd)
33+
if cwd in sys.path:
34+
sys.path.remove(cwd)
35+
sys.path.append(cwd)

test/conftest.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import platform
21
from collections.abc import Generator
32
from pathlib import Path
43

@@ -22,11 +21,6 @@ def global_git_config() -> None:
2221
for level in levels:
2322
pygit2.settings.search_path[level] = ''
2423

25-
# Fix tests running in Windows
26-
# XXX Still needed now we have moved to GitHub CI?
27-
if platform.system() == 'Windows':
28-
pygit2.option(pygit2.enums.Option.SET_OWNER_VALIDATION, False)
29-
3024

3125
@pytest.fixture
3226
def pygit2_empty_key() -> tuple[Path, str, str]:

0 commit comments

Comments
 (0)