Skip to content

Commit b23d4ec

Browse files
committed
fixes
1 parent e1787a1 commit b23d4ec

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/ansys/dpf/core/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def start_local_server(
160160
config=None,
161161
use_pypim_by_default=True,
162162
context=None,
163-
):
163+
) -> BaseServer:
164164
"""Start a new local DPF server at a given port and IP address.
165165
166166
This method requires Windows and ANSYS 2021 R1 or later. If ``as_global=True``, which is

src/ansys/dpf/core/server_context.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ def same_licensing_context(first, second):
8080
bool
8181
True if the licensing contexts are compatible, False otherwise.
8282
"""
83-
if (first == LicensingContextType.none and second != LicensingContextType.none) or (
84-
first != LicensingContextType.none and second == LicensingContextType.none
85-
):
86-
return False
8783
if int(first) == int(LicensingContextType.entry) and int(second) != int(
8884
LicensingContextType.entry
8985
):

tests/test_service.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,8 @@ def test_server_without_context(remote_config_server_type):
510510
)
511511
none_type = dpf.core.AvailableServerContexts.no_context.licensing_context_type
512512
assert server.context.licensing_context_type == none_type
513-
assert len(dpf.core.available_operator_names(server=server)) < 20
513+
if server.check_version("10.0"): # Before, there was a bug
514+
assert len(dpf.core.available_operator_names(server=server)) < 20
514515

515516

516517
@pytest.mark.order("last")

0 commit comments

Comments
 (0)