diff options
author | mathieui <mathieui@mathieui.net> | 2018-07-23 19:50:30 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2018-07-23 19:52:08 +0200 |
commit | fdc797aec733c355e1e36ddd4b508a833dc71c31 (patch) | |
tree | 011b46c7a04c563f6010f8d6fdf5568835fb49d2 /test | |
parent | 62aefc5b89a88611c1cee297cf3f8fc1ca136d72 (diff) | |
download | poezio-fdc797aec733c355e1e36ddd4b508a833dc71c31.tar.gz poezio-fdc797aec733c355e1e36ddd4b508a833dc71c31.tar.bz2 poezio-fdc797aec733c355e1e36ddd4b508a833dc71c31.tar.xz poezio-fdc797aec733c355e1e36ddd4b508a833dc71c31.zip |
Fix unittests for python 3.5
Diffstat (limited to 'test')
-rw-r--r-- | test/test_config.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_config.py b/test/test_config.py index 9b93096e..4632410b 100644 --- a/test/test_config.py +++ b/test/test_config.py @@ -27,7 +27,7 @@ class TestConfigSimple(object): assert config_obj.get('toto') == '' def test_file_content(self, config_obj): - with open(config_obj.file_name, 'r') as fd: + with open(str(config_obj.file_name), 'r') as fd: data = fd.read() supposed_content = '[Poezio]\ntest = coucou\ntest2 = true\n' assert data == supposed_content @@ -47,7 +47,7 @@ class TestConfigSimple(object): assert config_obj.get('test_float', default=1.0) == 1.5 def test_remove(self, config_obj): - with open(config_obj.file_name, 'r') as fd: + with open(str(config_obj.file_name), 'r') as fd: data = fd.read() supposed_content = ('[Poezio]\ntest = coucou\ntest2 = true\n' @@ -62,7 +62,7 @@ class TestConfigSimple(object): config_obj.remove_and_save('test_bool_f') config_obj.remove_and_save('test_float') - with open(config_obj.file_name, 'r') as fd: + with open(str(config_obj.file_name), 'r') as fd: data = fd.read() supposed_content = '[Poezio]\ntest = coucou\ntest2 = true\n' @@ -89,7 +89,7 @@ class TestConfigSections(object): assert config_obj.get('option2', section='NotPoezio') == 'test2' def test_file_content(self, config_obj): - with open(config_obj.file_name, 'r') as fd: + with open(str(config_obj.file_name), 'r') as fd: data = fd.read() supposed_content = ('[Poezio]\ntest = coucou\ntest2 = true\n' '[NotPoezio]\noption1 = test\noption2 = test2\n') |