diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2023-10-20 23:32:02 +0545 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-21 00:55:33 +0000 |
| commit | 034950b9eebacd6598ea518a0b254845bc806ab6 (patch) | |
| tree | b035f894f27e7f37118578a0ebcfca5fcfb7ff59 /tests | |
| parent | 0bcffd865616a0a14b7e9f2b03d77da2444d3025 (diff) | |
| download | git-repo-034950b9eebacd6598ea518a0b254845bc806ab6.tar.gz | |
cleanup: delete redundant "r" open mode
Change-Id: I86ebb8c5a9dc3752e8a25f4b11b64c5be3a6429e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390375
Tested-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_git_superproject.py | 8 | ||||
| -rw-r--r-- | tests/test_wrapper.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_git_superproject.py b/tests/test_git_superproject.py index 600b069f..478ebca7 100644 --- a/tests/test_git_superproject.py +++ b/tests/test_git_superproject.py | |||
| @@ -249,7 +249,7 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 249 | os.mkdir(self._superproject._superproject_path) | 249 | os.mkdir(self._superproject._superproject_path) |
| 250 | manifest_path = self._superproject._WriteManifestFile() | 250 | manifest_path = self._superproject._WriteManifestFile() |
| 251 | self.assertIsNotNone(manifest_path) | 251 | self.assertIsNotNone(manifest_path) |
| 252 | with open(manifest_path, "r") as fp: | 252 | with open(manifest_path) as fp: |
| 253 | manifest_xml_data = fp.read() | 253 | manifest_xml_data = fp.read() |
| 254 | self.assertEqual( | 254 | self.assertEqual( |
| 255 | sort_attributes(manifest_xml_data), | 255 | sort_attributes(manifest_xml_data), |
| @@ -284,7 +284,7 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 284 | ) | 284 | ) |
| 285 | self.assertIsNotNone(update_result.manifest_path) | 285 | self.assertIsNotNone(update_result.manifest_path) |
| 286 | self.assertFalse(update_result.fatal) | 286 | self.assertFalse(update_result.fatal) |
| 287 | with open(update_result.manifest_path, "r") as fp: | 287 | with open(update_result.manifest_path) as fp: |
| 288 | manifest_xml_data = fp.read() | 288 | manifest_xml_data = fp.read() |
| 289 | self.assertEqual( | 289 | self.assertEqual( |
| 290 | sort_attributes(manifest_xml_data), | 290 | sort_attributes(manifest_xml_data), |
| @@ -371,7 +371,7 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 371 | ) | 371 | ) |
| 372 | self.assertIsNotNone(update_result.manifest_path) | 372 | self.assertIsNotNone(update_result.manifest_path) |
| 373 | self.assertFalse(update_result.fatal) | 373 | self.assertFalse(update_result.fatal) |
| 374 | with open(update_result.manifest_path, "r") as fp: | 374 | with open(update_result.manifest_path) as fp: |
| 375 | manifest_xml_data = fp.read() | 375 | manifest_xml_data = fp.read() |
| 376 | # Verify platform/vendor/x's project revision hasn't | 376 | # Verify platform/vendor/x's project revision hasn't |
| 377 | # changed. | 377 | # changed. |
| @@ -436,7 +436,7 @@ class SuperprojectTestCase(unittest.TestCase): | |||
| 436 | ) | 436 | ) |
| 437 | self.assertIsNotNone(update_result.manifest_path) | 437 | self.assertIsNotNone(update_result.manifest_path) |
| 438 | self.assertFalse(update_result.fatal) | 438 | self.assertFalse(update_result.fatal) |
| 439 | with open(update_result.manifest_path, "r") as fp: | 439 | with open(update_result.manifest_path) as fp: |
| 440 | manifest_xml_data = fp.read() | 440 | manifest_xml_data = fp.read() |
| 441 | # Verify platform/vendor/x's project revision hasn't | 441 | # Verify platform/vendor/x's project revision hasn't |
| 442 | # changed. | 442 | # changed. |
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py index ef4dce10..ea7a8b4d 100644 --- a/tests/test_wrapper.py +++ b/tests/test_wrapper.py | |||
| @@ -418,7 +418,7 @@ class SetupGnuPG(RepoWrapperTestCase): | |||
| 418 | self.wrapper.home_dot_repo, "gnupg" | 418 | self.wrapper.home_dot_repo, "gnupg" |
| 419 | ) | 419 | ) |
| 420 | self.assertTrue(self.wrapper.SetupGnuPG(True)) | 420 | self.assertTrue(self.wrapper.SetupGnuPG(True)) |
| 421 | with open(os.path.join(tempdir, "keyring-version"), "r") as fp: | 421 | with open(os.path.join(tempdir, "keyring-version")) as fp: |
| 422 | data = fp.read() | 422 | data = fp.read() |
| 423 | self.assertEqual( | 423 | self.assertEqual( |
| 424 | ".".join(str(x) for x in self.wrapper.KEYRING_VERSION), | 424 | ".".join(str(x) for x in self.wrapper.KEYRING_VERSION), |
