Skip to content

Commit

Permalink
It looks like pypy supports fspath already
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavid committed Jan 18, 2025
1 parent eff9734 commit ff414d5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions test/test_nonunicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
from . import utils


bstring = b'\xc3master'

@utils.requires_network
@utils.requires_linux
def test_nonunicode_branchname(testrepo):
Expand All @@ -43,6 +41,7 @@ def test_nonunicode_branchname(testrepo):
newrepo = pygit2.clone_repository(
path=folderpath, url='https://github.com/pygit2/test_branch_notutf.git'
)
bstring = b'\xc3master'
assert bstring in [
(ref.split('/')[-1]).encode('utf8', 'surrogateescape')
for ref in newrepo.listall_references()
Expand Down
2 changes: 0 additions & 2 deletions test/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,6 @@ def test_discover_repo(tmp_path):
assert repo.path == discover_repository(str(subdir))


@utils.requires_fspath
def test_discover_repo_aspath(tmp_path):
repo = init_repository(Path(tmp_path), False)
subdir = Path(tmp_path) / 'test1' / 'test2'
Expand Down Expand Up @@ -811,7 +810,6 @@ def _check_worktree(worktree):
assert testrepo.list_worktrees() == []


@utils.requires_fspath
def test_worktree_aspath(testrepo):
worktree_name = 'foo'
worktree_dir = Path(tempfile.mkdtemp())
Expand Down
11 changes: 2 additions & 9 deletions test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,16 @@
requires_proxy = pytest.mark.skipif(not has_proxy, reason='Requires proxy at port 8888')

requires_ssh = pytest.mark.skipif(
pygit2.enums.Feature.SSH not in pygit2.features,
reason='Requires SSH'
pygit2.enums.Feature.SSH not in pygit2.features, reason='Requires SSH'
)


is_pypy = '__pypy__' in sys.builtin_module_names

requires_fspath = pytest.mark.xfail(
is_pypy,
reason="PyPy doesn't fully support fspath, see https://foss.heptapod.net/pypy/pypy/-/issues/3168",
)

requires_refcount = pytest.mark.skipif(is_pypy, reason='skip refcounts checks in pypy')

requires_linux = pytest.mark.xfail(
sys.platform != 'linux',
reason='probably a bug in libgit2 for non-linux platforms'
sys.platform != 'linux', reason='probably a bug in libgit2 for non-linux platforms'
)


Expand Down

0 comments on commit ff414d5

Please sign in to comment.