def _git(directory: str, *args: str) -> bytes:
p = subprocess.run(['git', '-C', directory] + list(args),
stdout=subprocess.PIPE, check=True)
- return p.stdout
+ return bytes(p.stdout)
def _commit_file(
os.environ['GIT_AUTHOR_EMAIL'] = 'test_git_cache@example.com'
os.environ['GIT_COMMITTER_EMAIL'] = 'test_git_cache@example.com'
+ os.environ['BACKOFF_MAX_TIME'] = '0'
+
self.tempdir = tempfile.TemporaryDirectory(prefix='git_cache_test-')
self.upstream = os.path.join(self.tempdir.name, 'upstream')
subprocess.run(['git', 'init', self.upstream], check=True)