aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/11_test_dch_main.py2
-rw-r--r--tests/test_Changelog.py4
-rw-r--r--tests/testutils/__init__.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/11_test_dch_main.py b/tests/11_test_dch_main.py
index 7e2a197..8e6ad08 100644
--- a/tests/11_test_dch_main.py
+++ b/tests/11_test_dch_main.py
@@ -82,7 +82,7 @@ class TestScriptDch(DebianGitTestRepo):
options.extend(dch_options)
ret = dch.main(options)
self.assertEqual(ret, 0)
- return open("debian/changelog").readlines()
+ return open("debian/changelog", encoding='utf-8').readlines()
def test_dch_main_new_upstream_version(self):
diff --git a/tests/test_Changelog.py b/tests/test_Changelog.py
index e66b42f..dd18bcd 100644
--- a/tests/test_Changelog.py
+++ b/tests/test_Changelog.py
@@ -236,7 +236,7 @@ def test_add_section():
>>> testdebdir = os.path.join(testdir, 'debian')
>>> testclname = os.path.join(testdebdir, "changelog")
>>> os.mkdir(testdebdir)
- >>> clh = open(os.path.join(testdebdir, "changelog"), "w")
+ >>> clh = open(os.path.join(testdebdir, "changelog"), "w", encoding='utf-8')
>>> ret = clh.write(cl_debian)
>>> clh.close()
>>> os.chdir(testdir)
@@ -282,7 +282,7 @@ def test_add_entry():
>>> testdebdir = os.path.join(testdir, 'debian')
>>> testclname = os.path.join(testdebdir, "changelog")
>>> os.mkdir(testdebdir)
- >>> clh = open(os.path.join(testdebdir, "changelog"), "w")
+ >>> clh = open(os.path.join(testdebdir, "changelog"), "w", encoding='utf-8')
>>> ret = clh.write(cl_debian)
>>> clh.close()
>>> os.chdir(testdir)
diff --git a/tests/testutils/__init__.py b/tests/testutils/__init__.py
index 60765af..0ba0912 100644
--- a/tests/testutils/__init__.py
+++ b/tests/testutils/__init__.py
@@ -80,7 +80,7 @@ def get_dch_default_urgency():
pass
else:
if ret == 0:
- with open(tmp_dch_name) as dchfile:
+ with open(tmp_dch_name, encoding='utf-8') as dchfile:
header = dchfile.readline().strip()
urgency = header.split()[-1].replace('urgency=', '')
finally: