diff --git a/tests/test_06_math/test_613_is_point_in_polygon_2d.py b/tests/test_06_math/test_613_is_point_in_polygon_2d.py index 4e736faa1..251fddc3b 100644 --- a/tests/test_06_math/test_613_is_point_in_polygon_2d.py +++ b/tests/test_06_math/test_613_is_point_in_polygon_2d.py @@ -2,14 +2,16 @@ # License: MIT License import pytest from ezdxf.math import Vec2, is_convex_polygon_2d - from ezdxf.math._construct import is_point_in_polygon_2d # Python version +from ezdxf.acc import USE_C_EXT is_point_in_polygon_cy = is_point_in_polygon_2d -try: # Cython version - from ezdxf.acc.construct import is_point_in_polygon_2d as is_point_in_polygon_cy -except ImportError: - pass + +if USE_C_EXT: + try: # Cython version + from ezdxf.acc.construct import is_point_in_polygon_2d as is_point_in_polygon_cy + except ImportError: + pass def test_inside_horizontal_box():