diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_manifest_xml.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 0e649a67..8aa97e70 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py | |||
| @@ -117,7 +117,7 @@ class ManifestParseTestCase(unittest.TestCase): | |||
| 117 | 117 | ||
| 118 | def getXmlManifest(self, data): | 118 | def getXmlManifest(self, data): |
| 119 | """Helper to initialize a manifest for testing.""" | 119 | """Helper to initialize a manifest for testing.""" |
| 120 | with open(self.manifest_file, 'w') as fp: | 120 | with open(self.manifest_file, 'w', encoding="utf-8") as fp: |
| 121 | fp.write(data) | 121 | fp.write(data) |
| 122 | return manifest_xml.XmlManifest(self.repodir, self.manifest_file) | 122 | return manifest_xml.XmlManifest(self.repodir, self.manifest_file) |
| 123 | 123 | ||
| @@ -428,7 +428,7 @@ class IncludeElementTests(ManifestParseTestCase): | |||
| 428 | def parse(name): | 428 | def parse(name): |
| 429 | name = self.encodeXmlAttr(name) | 429 | name = self.encodeXmlAttr(name) |
| 430 | # Setup target of the include. | 430 | # Setup target of the include. |
| 431 | with open(os.path.join(self.manifest_dir, 'target.xml'), 'w') as fp: | 431 | with open(os.path.join(self.manifest_dir, 'target.xml'), 'w', encoding="utf-8") as fp: |
| 432 | fp.write(f'<manifest><include name="{name}"/></manifest>') | 432 | fp.write(f'<manifest><include name="{name}"/></manifest>') |
| 433 | 433 | ||
| 434 | manifest = self.getXmlManifest(""" | 434 | manifest = self.getXmlManifest(""" |
