summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kutik <daniel.kutik@lavawerk.com>2023-08-15 18:00:10 +0200
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-09-13 18:23:40 +0000
commitda6ae1da8b057220d6b14d684e35a7b08068c935 (patch)
treed82d26c81fa81d9769ea6a782c6bc5c503fe62bf
parent57718974599a266e99174cf3892ed4a06a87dcbe (diff)
downloadgit-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>
-rw-r--r--tests/test_git_superproject.py8
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 [