diff options
| author | Daniel Kutik <daniel.kutik@lavawerk.com> | 2023-08-15 18:00:10 +0200 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-09-13 18:23:40 +0000 |
| commit | da6ae1da8b057220d6b14d684e35a7b08068c935 (patch) | |
| tree | d82d26c81fa81d9769ea6a782c6bc5c503fe62bf /tests/test_git_superproject.py | |
| parent | 57718974599a266e99174cf3892ed4a06a87dcbe (diff) | |
| download | git-repo-da6ae1da8b057220d6b14d684e35a7b08068c935.tar.gz | |
tests: test_git_superproject.py: fix py3.6 & 3.7
tests/test_git_superproject.py::SuperprojectTestCase::test_Fetch was
failing in Python 3.6 and 3.7 due to attribute args only being
introduced in Python 3.8. Falling back on old way of accessing
the arguments.
Test: tox with Python 3.6 to 3.11
Change-Id: Iae1934a7bce8cbd6b4519e4dbc92d94e21b43435
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/382818
Tested-by: Daniel Kutik <daniel.kutik@lavawerk.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Daniel Kutik <daniel.kutik@lavawerk.com>
Diffstat (limited to 'tests/test_git_superproject.py')
| -rw-r--r-- | tests/test_git_superproject.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index f884f507..dc46ec65 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py | |||
| @@ -490,7 +490,9 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 490 | 490 | ||
| 491 | self.assertTrue(self._superproject._Fetch()) | 491 | self.assertTrue(self._superproject._Fetch()) |
| 492 | self.assertEqual( | 492 | self.assertEqual( |
| 493 | mock_git_command.call_args.args, | 493 | # TODO: Once we require Python 3.8+, |
| 494 | # use 'mock_git_command.call_args.args'. | ||
| 495 | mock_git_command.call_args[0], | ||
| 494 | ( | 496 | ( |
| 495 | None, | 497 | None, |
| 496 | [ | 498 | [ |
| @@ -510,7 +512,9 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 510 | # If branch for revision exists, set as --negotiation-tip. | 512 | # If branch for revision exists, set as --negotiation-tip. |
| 511 | self.assertTrue(self._superproject._Fetch()) | 513 | self.assertTrue(self._superproject._Fetch()) |
| 512 | self.assertEqual( | 514 | self.assertEqual( |
| 513 | mock_git_command.call_args.args, | 515 | # TODO: Once we require Python 3.8+, |
| 516 | # use 'mock_git_command.call_args.args'. | ||
| 517 | mock_git_command.call_args[0], | ||
| 514 | ( | 518 | ( |
| 515 | None, | 519 | None, |
| 516 | [ | 520 | [ |
