GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit 35e42976 authored by Vincent Michel's avatar Vincent Michel

Fix python2 compat

parent 760470ab
Pipeline #891 passed with stages
in 1 minute and 17 seconds
......@@ -3,7 +3,7 @@
from __future__ import absolute_import
import os
from six.moves import configparser
import configparser
import numpy
......
......@@ -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'],
......
......@@ -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(FileNotFoundError):
with pytest.raises(IOError):
interface.get_config('i_dont_exist.ini')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment