Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/entry/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def _get_test_files_directory():
_get_test_files_directory()
] = "/tmp/test_files"


SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_1 = meets_version(
get_server_version(core._global_server()), "8.1"
)
SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 = meets_version(
get_server_version(core._global_server()), "8.0"
)
Expand Down
8 changes: 6 additions & 2 deletions tests/entry/test_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ def test_license_agr(restore_accept_la_env):
config = dpf.AvailableServerConfigs.InProcessServer
init_val = os.environ["ANSYS_DPF_ACCEPT_LA"]
del os.environ["ANSYS_DPF_ACCEPT_LA"]
with pytest.raises(errors.DPFServerException):
if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 and not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_1:
dpf.start_local_server(config=config, as_global=True)
with pytest.raises(errors.DPFServerException):
dpf.Operator("stream_provider")
else:
with pytest.raises(errors.DPFServerException):
dpf.start_local_server(config=config, as_global=True)
with pytest.raises(errors.DPFServerException):
dpf.Operator("stream_provider")
os.environ["ANSYS_DPF_ACCEPT_LA"] = init_val
dpf.start_local_server(config=config, as_global=True)
assert "static" in examples.find_static_rst()
Expand Down