aboutsummaryrefslogtreecommitdiff
path: root/tests/test_read_settings.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-10-03 11:42:30 +0200
committerDaniel Lobato García <me@daniellobato.me>2016-10-03 11:42:30 +0200
commitfaa364138450fc390906956e2db358387200e19d (patch)
treeb17fea637da13720fd3e679be464473732255aa0 /tests/test_read_settings.py
parentd66388b843f49ed556e003b746fcf41064c4171d (diff)
Python3 (#37)
* Handle python3's configparser as well * tests: Open file in text mode to avoid string bytes conversion with Python3 * tests: drop unnecessary dict These arent sortable in Python3 * Convert returned facts to list While Python2 has a list here Python3 returns dict_values which is not indexable as is. * tests: Parse url for comparison Python3 uses hash seeds for comparison so the QS parts dont have a fixed order. * Test python3.4 and python3.5 as well
Diffstat (limited to 'tests/test_read_settings.py')
-rw-r--r--tests/test_read_settings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_read_settings.py b/tests/test_read_settings.py
index 65cb0ae..ac97b18 100644
--- a/tests/test_read_settings.py
+++ b/tests/test_read_settings.py
@@ -20,7 +20,7 @@ class TestReadSettings(unittest.TestCase):
self.assertFalse(self.inv.read_settings())
def test_parse_params(self):
- with tempfile.NamedTemporaryFile() as t:
+ with tempfile.NamedTemporaryFile(mode='w+') as t:
print("""
[foreman]
url=http://127.0.0.1