File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,9 @@ def _get_test_files_directory():
4747 _get_test_files_directory ()
4848 ] = "/tmp/test_files"
4949
50-
50+ SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_1 = meets_version (
51+ get_server_version (core ._global_server ()), "8.1"
52+ )
5153SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 = meets_version (
5254 get_server_version (core ._global_server ()), "8.0"
5355)
Original file line number Diff line number Diff line change @@ -22,10 +22,14 @@ def test_license_agr(restore_accept_la_env):
2222 config = dpf .AvailableServerConfigs .InProcessServer
2323 init_val = os .environ ["ANSYS_DPF_ACCEPT_LA" ]
2424 del os .environ ["ANSYS_DPF_ACCEPT_LA" ]
25- with pytest . raises ( errors . DPFServerException ) :
25+ if conftest . SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 and not conftest . SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_1 :
2626 dpf .start_local_server (config = config , as_global = True )
27- with pytest .raises (errors .DPFServerException ):
2827 dpf .Operator ("stream_provider" )
28+ else :
29+ with pytest .raises (errors .DPFServerException ):
30+ dpf .start_local_server (config = config , as_global = True )
31+ with pytest .raises (errors .DPFServerException ):
32+ dpf .Operator ("stream_provider" )
2933 os .environ ["ANSYS_DPF_ACCEPT_LA" ] = init_val
3034 dpf .start_local_server (config = config , as_global = True )
3135 assert "static" in examples .find_static_rst ()
You can’t perform that action at this time.
0 commit comments