Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karthikeyan Singaravelan
poezio
Commits
37b4eab2
Unverified
Commit
37b4eab2
authored
Jul 23, 2018
by
mathieui
Browse files
Fix unittests for python 3.5
parent
cd6dba62
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
test/test_config.py
test/test_config.py
+4
-4
No files found.
test/test_config.py
View file @
37b4eab2
...
...
@@ -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]
\n
test = coucou
\n
test2 = 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]
\n
test = coucou
\n
test2 = 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]
\n
test = coucou
\n
test2 = 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]
\n
test = coucou
\n
test2 = true
\n
'
'[NotPoezio]
\n
option1 = test
\n
option2 = test2
\n
'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment