From 7fda9cdc2d2053c3becf5bb92c38c7325e2d31c3 Mon Sep 17 00:00:00 2001 From: Martin Raspaud Date: Mon, 31 Oct 2016 14:35:08 +0100 Subject: [PATCH] Fix unittests for python 3 Signed-off-by: Martin Raspaud --- .travis.yml | 2 +- config_finder/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index bd050f1..116b0a9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,6 +11,6 @@ install: - pip install . - pip install coveralls script: -- coverage run --source=config-finder setup.py test +- coverage run --source=config_finder setup.py test after_success: coveralls sudo: false diff --git a/config_finder/__init__.py b/config_finder/__init__.py index 45bc881..83c8af9 100644 --- a/config_finder/__init__.py +++ b/config_finder/__init__.py @@ -183,7 +183,7 @@ def test_ini(self): for section, content in dict1.items(): cfg.add_section(section) for key, val in content.items(): - cfg.set(section, key, val) + cfg.set(section, key, str(val)) with open('/tmp/conf.ini', 'w') as fd_: cfg.write(fd_) @@ -192,7 +192,7 @@ def test_ini(self): for section, content in dict2.items(): cfg.add_section(section) for key, val in content.items(): - cfg.set(section, key, val) + cfg.set(section, key, str(val)) with open('./conf.ini', 'w') as fd_: cfg.write(fd_)