diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8cb5730..1b59f44 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,15 +5,3 @@ repos: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - - repo: local - hooks: - - id: format - name: format - entry: rye fmt - language: system - types: [python] - - id: lint - name: lint - entry: rye lint - language: system - types: [python] diff --git a/tests/test_grid.py b/tests/test_grid.py index 85f6b07..5b0e410 100644 --- a/tests/test_grid.py +++ b/tests/test_grid.py @@ -66,6 +66,12 @@ def test_concrete_case(self): (10000, 2, 8, 1, 1000, 1000, const.EUCLIDEAN_DISTANCE), (10000, 2, 8, 1, 1500, 2000, const.EUCLIDEAN_DISTANCE), (50000, 2, 8, 1, 1000, 1000, const.EUCLIDEAN_DISTANCE), + # other metrics + change order between r0 and r1 + (10, 2, 2, 1, 100, 100, const.CHEBYSHEV_DISTANCE), + (10, 8, 2, 1, 100, 100, const.MANHATTAN_DISTANCE), + # map corner cases: 1x1 map, "line" map + (100000, 1, 1, 1, 1, 1, const.EUCLIDEAN_DISTANCE), + (10000, 10, 1, 1, 1000, 1, const.EUCLIDEAN_DISTANCE), ], ) def test_primitive_func(self, N, R0, R1, RADIUS, WIDTH, HEIGHT, distance_type): diff --git a/tests/test_move.py b/tests/test_move.py index f6e84c4..5c32fc0 100644 --- a/tests/test_move.py +++ b/tests/test_move.py @@ -31,6 +31,11 @@ def move_line( (42, 17, 15), (59, 10, 45), (1, 2, 10), + # some corner cases + (1, 1, 100000), + (0, 0, 1), + (-100, -100, -1), + (10, 50, 0), ], ) def test_move_radius(self, x: int, y: int, move_radius: int):