diff options
| author | Jason R. Coombs <jaraco@google.com> | 2023-09-29 11:04:49 -0400 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-10-31 16:03:54 +0000 |
| commit | b32ccbb66bb16965ecb8b4e266c4e45186636c1b (patch) | |
| tree | 1c1eda32af709f0cbf822de56f696ccd531ce6de /tests/test_manifest_xml.py | |
| parent | b99272c601bc5f466c3cfc782bb852c2c967ad27 (diff) | |
| download | git-repo-b32ccbb66bb16965ecb8b4e266c4e45186636c1b.tar.gz | |
cleanup: Update codebase to expect Python 3.6
- Bump minimum version to Python 3.6.
- Use f-strings in a lot of places.
Change-Id: I2aa70197230fcec2eff8e7c8eb754f20c08075bb
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/389034
Tested-by: Jason R. Coombs <jaraco@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Commit-Queue: Jason R. Coombs <jaraco@google.com>
Diffstat (limited to 'tests/test_manifest_xml.py')
| -rw-r--r-- | tests/test_manifest_xml.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index bd255dcc..3fcf09fa 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py | |||
| @@ -198,13 +198,13 @@ class ValueTests(unittest.TestCase): | |||
| 198 | def test_bool_true(self): | 198 | def test_bool_true(self): |
| 199 | """Check XmlBool true values.""" | 199 | """Check XmlBool true values.""" |
| 200 | for value in ("yes", "true", "1"): | 200 | for value in ("yes", "true", "1"): |
| 201 | node = self._get_node('<node a="%s"/>' % (value,)) | 201 | node = self._get_node(f'<node a="{value}"/>') |
| 202 | self.assertTrue(manifest_xml.XmlBool(node, "a")) | 202 | self.assertTrue(manifest_xml.XmlBool(node, "a")) |
| 203 | 203 | ||
| 204 | def test_bool_false(self): | 204 | def test_bool_false(self): |
| 205 | """Check XmlBool false values.""" | 205 | """Check XmlBool false values.""" |
| 206 | for value in ("no", "false", "0"): | 206 | for value in ("no", "false", "0"): |
| 207 | node = self._get_node('<node a="%s"/>' % (value,)) | 207 | node = self._get_node(f'<node a="{value}"/>') |
| 208 | self.assertFalse(manifest_xml.XmlBool(node, "a")) | 208 | self.assertFalse(manifest_xml.XmlBool(node, "a")) |
| 209 | 209 | ||
| 210 | def test_int_default(self): | 210 | def test_int_default(self): |
| @@ -220,7 +220,7 @@ class ValueTests(unittest.TestCase): | |||
| 220 | def test_int_good(self): | 220 | def test_int_good(self): |
| 221 | """Check XmlInt numeric handling.""" | 221 | """Check XmlInt numeric handling.""" |
| 222 | for value in (-1, 0, 1, 50000): | 222 | for value in (-1, 0, 1, 50000): |
| 223 | node = self._get_node('<node a="%s"/>' % (value,)) | 223 | node = self._get_node(f'<node a="{value}"/>') |
| 224 | self.assertEqual(value, manifest_xml.XmlInt(node, "a")) | 224 | self.assertEqual(value, manifest_xml.XmlInt(node, "a")) |
| 225 | 225 | ||
| 226 | def test_int_invalid(self): | 226 | def test_int_invalid(self): |
