Skip to content

Commit 15e0d51

Browse files
RyanJWardpre-commit-ci[bot]pyansys-ci-botRobPasMue
authored
test: logo removal should work on linux now (#2098)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Co-authored-by: Roberto Pastor Muela <37798125+RobPasMue@users.noreply.github.com>
1 parent f82160d commit 15e0d51

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

doc/changelog.d/2098.test.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Logo removal should work on linux now

src/ansys/geometry/core/tools/prepare_tools.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,10 @@ def find_and_remove_logos(
374374
"""
375375
from ansys.geometry.core.designer.body import Body
376376

377-
if BackendType.is_linux_service(self._grpc_client.backend_type):
378-
# not yet available in Linux
377+
if BackendType.is_linux_service(
378+
self._grpc_client.backend_type
379+
) and self._grpc_client.backend_version < (26, 1, 0):
380+
# not yet available on Linux until 26.1.0
379381
LOG.warning("Logo detection not available on Linux")
380382
return
381383

tests/integration/test_prepare_tools.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
from pint import Quantity
2525

26-
from ansys.geometry.core.connection.backend import BackendType
2726
from ansys.geometry.core.math.point import Point2D
2827
from ansys.geometry.core.misc.measurements import UNITS
2928
from ansys.geometry.core.modeler import Modeler
@@ -136,9 +135,6 @@ def test_detect_logos(modeler: Modeler):
136135
result = modeler.prepare_tools.find_logos(max_height=0.005)
137136
assert len(result.face_ids) == 147
138137
success = modeler.prepare_tools.find_and_remove_logos(max_height=0.005)
139-
# Skip the rest of the test if running on a Linux service backend
140-
if BackendType.is_linux_service(modeler.client.backend_type):
141-
return
142138
assert success is True
143139
assert len(body.faces) == 42
144140
result = modeler.prepare_tools.find_and_remove_logos(None, min_height=0.001, max_height=0.005)
@@ -162,9 +158,6 @@ def test_detect_and_fix_logo_as_problem_area(modeler: Modeler):
162158
# Test finding logos with max height
163159
result_with_max_height = modeler.prepare_tools.find_logos(max_height=0.005)
164160
assert len(result_with_max_height.face_ids) == 147
165-
# Skip fix-related assertions if running on a Linux service backend
166-
if BackendType.is_linux_service(modeler.client.backend_type):
167-
return
168161
# Test removing logos with max height
169162
success_remove_logos = modeler.prepare_tools.find_and_remove_logos(max_height=0.005)
170163
assert success_remove_logos is True

0 commit comments

Comments
 (0)