From a3ac81627885f78b9391ff291c4a5bc617494045 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Tue, 11 Jan 2022 12:12:55 +0100 Subject: 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 Tested-by: Sebastian Wagner --- tests/test_project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/test_project.py') 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): # 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' -- cgit v1.2.3-54-g00ecf