Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
python-handel
Commits
35e42976
Commit
35e42976
authored
Aug 30, 2017
by
Vincent Michel
Browse files
Fix python2 compat
parent
760470ab
Pipeline
#891
passed with stages
in 1 minute and 17 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
handel/interface.py
View file @
35e42976
...
...
@@ -3,7 +3,7 @@
from
__future__
import
absolute_import
import
os
from
six.moves
import
configparser
import
configparser
import
numpy
...
...
setup.py
View file @
35e42976
...
...
@@ -11,7 +11,7 @@ setup(
version
=
'0.1.0.dev0'
,
packages
=
[
'handel'
],
install_requires
=
[
'cffi'
,
'numpy'
,
'
six
'
],
install_requires
=
[
'cffi'
,
'numpy'
,
'
configparser
'
],
setup_requires
=
[
'pytest-runner'
,
'pytest'
]
if
TESTING
else
[],
tests_require
=
[
'pytest-cov'
,
'mock'
],
...
...
tests/test_interface.py
View file @
35e42976
...
...
@@ -17,7 +17,7 @@ def interface():
def
test_init
(
interface
):
m
=
interface
.
handel
.
xiaInit
m
.
return_value
=
0
assert
interface
.
init
(
'somefile'
)
is
None
assert
interface
.
init
(
u
'somefile'
)
is
None
m
.
assert_called_once_with
(
b
'somefile'
)
# Make sure errors have been checked
interface
.
check_error
.
assert_called_once_with
(
0
)
...
...
@@ -469,5 +469,5 @@ def test_get_config(interface):
d
=
interface
.
get_config
(
filename
)
assert
d
[
'detector definitions'
][
'alias'
]
==
'detector1'
assert
'DEFAULT'
not
in
d
with
pytest
.
raises
(
FileNotFound
Error
):
with
pytest
.
raises
(
IO
Error
):
interface
.
get_config
(
'i_dont_exist.ini'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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