summaryrefslogtreecommitdiffstats
path: root/tests/test_project.py
diff options
context:
space:
mode:
authorSebastian Wagner <sebix@sebix.at>2022-01-11 12:12:55 +0100
committerSebastian Wagner <sebix@sebix.at>2022-01-11 20:16:42 +0000
commita3ac81627885f78b9391ff291c4a5bc617494045 (patch)
tree0625d3702aa004bb3604e861a71539c642f5f9ed /tests/test_project.py
parent98bb76577d9e7e0ffdeb643f1654ec006f6bbc8c (diff)
downloadgit-repo-a3ac81627885f78b9391ff291c4a5bc617494045.tar.gz
test_project: use os.readlink instead of Path.readlink
Path.readlink is only available on Python 3.9, breaking compatibility with all python versions below. os.readlink is already used in other places of this file, so use it here as well. Change-Id: I5acf8f5334a3e7c8de9cea1939d7e2b9af5f30ae Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/327844 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Sebastian Wagner <sebix@sebix.at>
Diffstat (limited to 'tests/test_project.py')
-rw-r--r--tests/test_project.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_project.py b/tests/test_project.py
index 4f449227..8829637e 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -382,7 +382,7 @@ class MigrateWorkTreeTests(unittest.TestCase):
382 382
383 # Make sure the dir was transformed into a symlink. 383 # Make sure the dir was transformed into a symlink.
384 self.assertTrue(dotgit.is_symlink()) 384 self.assertTrue(dotgit.is_symlink())
385 self.assertEqual(str(dotgit.readlink()), '../../.repo/projects/src/test.git') 385 self.assertEqual(os.readlink(dotgit), '../../.repo/projects/src/test.git')
386 386
387 # Make sure files were moved over. 387 # Make sure files were moved over.
388 gitdir = tempdir / '.repo/projects/src/test.git' 388 gitdir = tempdir / '.repo/projects/src/test.git'