Repositories / agent-snapshot.git
test_programs/read_non_utf8_filename.py
Clone (read-only): git clone http://git.guha-anderson.com/git/agent-snapshot.git
import os
from pathlib import Path
testdata = Path(os.environ["AGENT_SNAPSHOT_TEST_REPO"])
path = os.path.join(os.fsencode(testdata), b"non-utf8-\xff.txt")
with open(path, "rb") as handle:
handle.read()