Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix retro with 2024.2.pre0 for test_license_agr #1465

Merged
merged 1 commit into from
Mar 11, 2024
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
Loading