Dulwich.io dulwich / 884fd89
Fix test when run with tempdir on different windows drive. Jelmer Vernooń≥ 13 days ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
448448 repo_dir = os.path.join(os.path.dirname(__file__), 'data', 'repos')
449449 shutil.copytree(os.path.join(repo_dir, 'a.git'),
450450 os.path.join(temp_dir, 'a.git'), symlinks=True)
451 rel = os.path.relpath(os.path.join(repo_dir, 'submodule'), temp_dir)
451 try:
452 rel = os.path.relpath(
453 os.path.join(repo_dir, 'submodule'), temp_dir)
454 except ValueError:
455 # On windows, these two paths could be on different drives,
456 # making it impossible to determine a relative path.
457 rel = os.path.join(repo_dir, 'submodule')
452458 os.symlink(os.path.join(rel, 'dotgit'), os.path.join(temp_dir, '.git'))
453459 with Repo(temp_dir) as r:
454460 self.assertEqual(r.head(),