diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-10-03 11:42:30 +0200 |
---|---|---|
committer | Daniel Lobato García <me@daniellobato.me> | 2016-10-03 11:42:30 +0200 |
commit | faa364138450fc390906956e2db358387200e19d (patch) | |
tree | b17fea637da13720fd3e679be464473732255aa0 /tests/test_read_settings.py | |
parent | d66388b843f49ed556e003b746fcf41064c4171d (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.py | 2 |
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 |