mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
5771897459
commit
da6ae1da8b
@ -490,7 +490,9 @@ class SuperprojectTestCase(unittest.TestCase):
|
|||||||
|
|
||||||
self.assertTrue(self._superproject._Fetch())
|
self.assertTrue(self._superproject._Fetch())
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
mock_git_command.call_args.args,
|
# TODO: Once we require Python 3.8+,
|
||||||
|
# use 'mock_git_command.call_args.args'.
|
||||||
|
mock_git_command.call_args[0],
|
||||||
(
|
(
|
||||||
None,
|
None,
|
||||||
[
|
[
|
||||||
@ -510,7 +512,9 @@ class SuperprojectTestCase(unittest.TestCase):
|
|||||||
# If branch for revision exists, set as --negotiation-tip.
|
# If branch for revision exists, set as --negotiation-tip.
|
||||||
self.assertTrue(self._superproject._Fetch())
|
self.assertTrue(self._superproject._Fetch())
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
mock_git_command.call_args.args,
|
# TODO: Once we require Python 3.8+,
|
||||||
|
# use 'mock_git_command.call_args.args'.
|
||||||
|
mock_git_command.call_args[0],
|
||||||
(
|
(
|
||||||
None,
|
None,
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user