mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-06 09:21:07 +03:00
remove redundant open() arg: encoding='utf8'
By default, open() returns a str: https://docs.python.org/3/library/functions.html#open By default, str is UTF-8: https://docs.python.org/3/library/stdtypes.html#str This used to matter on Python 2.x, but this code is 3.x only now.
This commit is contained in:
parent
6e5d1a6cc3
commit
57556aceee
9 changed files with 27 additions and 27 deletions
|
@ -81,8 +81,8 @@ class MetadataTest(unittest.TestCase):
|
|||
fdroidserver.metadata.write_metadata(os.path.join(testdir, appid + '.yml'), app)
|
||||
|
||||
# assert rewrite result
|
||||
with open(os.path.join(testdir, 'fake.ota.update.yml'), 'r', encoding='utf-8') as result:
|
||||
with open('metadata-rewrite-yml/fake.ota.update.yml', 'r', encoding='utf-8') as orig:
|
||||
with open(os.path.join(testdir, 'fake.ota.update.yml'), 'r') as result:
|
||||
with open('metadata-rewrite-yml/fake.ota.update.yml', 'r') as orig:
|
||||
self.maxDiff = None
|
||||
self.assertEqual(result.read(), orig.read())
|
||||
|
||||
|
@ -97,8 +97,8 @@ class MetadataTest(unittest.TestCase):
|
|||
fdroidserver.metadata.write_metadata(os.path.join(testdir, appid + '.yml'), app)
|
||||
|
||||
# assert rewrite result
|
||||
with open(os.path.join(testdir, 'org.fdroid.fdroid.yml'), 'r', encoding='utf-8') as result:
|
||||
with open('metadata-rewrite-yml/org.fdroid.fdroid.yml', 'r', encoding='utf-8') as orig:
|
||||
with open(os.path.join(testdir, 'org.fdroid.fdroid.yml'), 'r') as result:
|
||||
with open('metadata-rewrite-yml/org.fdroid.fdroid.yml', 'r') as orig:
|
||||
self.maxDiff = None
|
||||
self.assertEqual(result.read(), orig.read())
|
||||
|
||||
|
@ -113,8 +113,8 @@ class MetadataTest(unittest.TestCase):
|
|||
fdroidserver.metadata.write_metadata(os.path.join(testdir, appid + '.yml'), app)
|
||||
|
||||
# assert rewrite result
|
||||
with open(os.path.join(testdir, 'app.with.special.build.params.yml'), 'r', encoding='utf-8') as result:
|
||||
with open('metadata-rewrite-yml/app.with.special.build.params.yml', 'r', encoding='utf-8') as orig:
|
||||
with open(os.path.join(testdir, 'app.with.special.build.params.yml'), 'r') as result:
|
||||
with open('metadata-rewrite-yml/app.with.special.build.params.yml', 'r') as orig:
|
||||
self.maxDiff = None
|
||||
self.assertEqual(result.read(), orig.read())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue