Commit 3c2a5430 authored by Vincent Michel's avatar Vincent Michel
Browse files

Fix tests for python 2.7

parent a238c42b
Pipeline #4056 passed with stage
in 1 minute and 32 seconds
...@@ -687,7 +687,6 @@ def get_config(*path): ...@@ -687,7 +687,6 @@ def get_config(*path):
# Check version at import time # Check version at import time
if get_handel_version() < (1, 2, 19): if get_handel_version() < (1, 2, 19):
print(get_handel_version())
warnings.warn("""\ warnings.warn("""\
The current handel version is older than 1.2.19. The current handel version is older than 1.2.19.
This might cause bugs, especially with the FalconX. This might cause bugs, especially with the FalconX.
......
...@@ -21,8 +21,15 @@ def interface_import(): ...@@ -21,8 +21,15 @@ def interface_import():
assert len(record) == 1 assert len(record) == 1
assert "older than 1.2.19" in str(record[0].message) assert "older than 1.2.19" in str(record[0].message)
# Remove mock
del dlopen.return_value.xiaGetVersionInfo
# Work around for https://bugs.python.org/issue31177
dlopen.return_value._mock_children.clear()
# Check dlopen
dlopen.assert_called_once_with('handel.dll') dlopen.assert_called_once_with('handel.dll')
assert interface.handel == dlopen.return_value assert interface.handel == dlopen.return_value
yield interface yield interface
......
Supports Markdown
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