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>
diff --git a/tests/test_project.py b/tests/test_project.py
index 4f44922..8829637 100644
--- a/tests/test_project.py
+++ b/tests/test_project.py
@@ -382,7 +382,7 @@
# Make sure the dir was transformed into a symlink.
self.assertTrue(dotgit.is_symlink())
- self.assertEqual(str(dotgit.readlink()), '../../.repo/projects/src/test.git')
+ self.assertEqual(os.readlink(dotgit), '../../.repo/projects/src/test.git')
# Make sure files were moved over.
gitdir = tempdir / '.repo/projects/src/test.git'