mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-15 08:47:11 +00:00
style: use import test_manifest_xml everywhere
Align with Google style guides and `import test_manifest_xml` as a module rather than import symbols out of it. Change-Id: Ib85716bea2eb09028e05b86d445336405e1df870 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/654809 Reviewed-by: Brian Gan <brgan@google.com> Tested-by: Mike Frysinger <vapier@google.com> Commit-Queue: Mike Frysinger <vapier@google.com>
This commit is contained in:
1 parent
52f01a18da
commit
9d01d216e0
2 files changed
+7
-7
No files matched your search
@@ -3,7 +3,7 @@
|
||||
max-line-length = 80
|
||||
per-file-ignores =
|
||||
# E501: line too long
|
||||
tests/test_git_superproject.py: E501 IMR241,
|
||||
tests/test_git_superproject.py: E501,
|
||||
# IMR241: When using the from syntax, only submodules are imported, not module elements.
|
||||
# NB: Do not add any more here.
|
||||
command.py: IMR241,
|
||||
|
||||
@@ -22,7 +22,7 @@ import unittest
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
from test_manifest_xml import sort_attributes
|
||||
import test_manifest_xml
|
||||
|
||||
import git_superproject
|
||||
import git_trace2_event_log
|
||||
@@ -255,7 +255,7 @@ class SuperprojectTestCase(unittest.TestCase):
|
||||
with open(manifest_path) as fp:
|
||||
manifest_xml_data = fp.read()
|
||||
self.assertEqual(
|
||||
sort_attributes(manifest_xml_data),
|
||||
test_manifest_xml.sort_attributes(manifest_xml_data),
|
||||
'<?xml version="1.0" ?><manifest>'
|
||||
'<remote fetch="http://localhost" name="default-remote"/>'
|
||||
'<default remote="default-remote" revision="refs/heads/main"/>'
|
||||
@@ -290,7 +290,7 @@ class SuperprojectTestCase(unittest.TestCase):
|
||||
with open(update_result.manifest_path) as fp:
|
||||
manifest_xml_data = fp.read()
|
||||
self.assertEqual(
|
||||
sort_attributes(manifest_xml_data),
|
||||
test_manifest_xml.sort_attributes(manifest_xml_data),
|
||||
'<?xml version="1.0" ?><manifest>'
|
||||
'<remote fetch="http://localhost" name="default-remote"/>'
|
||||
'<default remote="default-remote" revision="refs/heads/main"/>'
|
||||
@@ -317,7 +317,7 @@ class SuperprojectTestCase(unittest.TestCase):
|
||||
self.maxDiff = None
|
||||
self.assertIsNone(manifest.superproject)
|
||||
self.assertEqual(
|
||||
sort_attributes(manifest.ToXml().toxml()),
|
||||
test_manifest_xml.sort_attributes(manifest.ToXml().toxml()),
|
||||
'<?xml version="1.0" ?><manifest>'
|
||||
'<remote fetch="http://localhost" name="default-remote"/>'
|
||||
'<default remote="default-remote" revision="refs/heads/main"/>'
|
||||
@@ -379,7 +379,7 @@ class SuperprojectTestCase(unittest.TestCase):
|
||||
# Verify platform/vendor/x's project revision hasn't
|
||||
# changed.
|
||||
self.assertEqual(
|
||||
sort_attributes(manifest_xml_data),
|
||||
test_manifest_xml.sort_attributes(manifest_xml_data),
|
||||
'<?xml version="1.0" ?><manifest>'
|
||||
'<remote fetch="http://localhost" name="default-remote"/>'
|
||||
'<remote fetch="http://localhost2" name="goog"/>'
|
||||
@@ -444,7 +444,7 @@ class SuperprojectTestCase(unittest.TestCase):
|
||||
# Verify platform/vendor/x's project revision hasn't
|
||||
# changed.
|
||||
self.assertEqual(
|
||||
sort_attributes(manifest_xml_data),
|
||||
test_manifest_xml.sort_attributes(manifest_xml_data),
|
||||
'<?xml version="1.0" ?><manifest>'
|
||||
'<remote fetch="http://localhost" name="default-remote"/>'
|
||||
'<default remote="default-remote" revision="refs/heads/main"/>'
|
||||
|
||||
Reference in new issue
Block a user