Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ dependency-versions = "pinned"
environment = {LIBGIT2_VERSION="1.9.1", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.3.3", LIBGIT2="/project/ci"}

before-all = "sh build.sh"
test-command = "pytest"
test-sources = ["test"]
before-test = "pip install -r {project}/requirements-test.txt"
# Will avoid testing on emulated architectures (specifically ppc64le)
test-skip = "*-*linux_ppc64le"

[tool.cibuildwheel.linux]
repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib64 auditwheel repair -w {dest_dir} {wheel}"
Expand Down
5 changes: 3 additions & 2 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@
import sys

cwd = os.getcwd()
sys.path.remove(cwd)
sys.path.append(cwd)
if cwd in sys.path:
sys.path.remove(cwd)
sys.path.append(cwd)
6 changes: 0 additions & 6 deletions test/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import platform
from collections.abc import Generator
from pathlib import Path

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

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


@pytest.fixture
def pygit2_empty_key() -> tuple[Path, str, str]:
Expand Down
5 changes: 4 additions & 1 deletion test/test_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,10 @@ def test_set_target_with_message(testrepo: Repository) -> None:
assert reference.raw_target == b'refs/heads/i18n'
first = list(reference.log())[0]
assert first.message == msg
assert first.committer == sig
# Signature.time and Signature.encoding may not be equal.
# Here we only care that the name and email are correctly set.
assert first.committer.name == sig.name
assert first.committer.email == sig.email


def test_delete(testrepo: Repository) -> None:
Expand Down
Loading