MCPcopy Create free account
hub / github.com/libgit2/pygit2 / test_nonunicode_branchname

Function test_nonunicode_branchname

test/test_nonunicode.py:48–59  ·  view source on GitHub ↗
(testrepo: Repository)

Source from the content-addressed store, hash-verified

46@utils.requires_network
47@works_in_linux
48def test_nonunicode_branchname(testrepo: Repository) -> None:
49 folderpath = 'temp_repo_nonutf'
50 if os.path.exists(folderpath):
51 shutil.rmtree(folderpath)
52 newrepo = pygit2.clone_repository(
53 path=folderpath, url='https://github.com/pygit2/test_branch_notutf.git'
54 )
55 bstring = b'\xc3master'
56 assert bstring in [
57 (ref.split('/')[-1]).encode('utf8', 'surrogateescape')
58 for ref in newrepo.listall_references()
59 ] # Remote branch among references: 'refs/remotes/origin/\udcc3master'

Callers

nothing calls this directly

Calls 2

existsMethod · 0.80
listall_referencesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…