Skip to content

Commit 94b4c1d

Browse files
committed
Use literal array orders in the heuristic regression
1 parent 14b4421 commit 94b4c1d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎tests/test_simplegraph_heuristic.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
"""Automatic heuristics must account for cheaper cardinal alternatives."""
22

3+
from typing import Literal
4+
35
import numpy as np
46
import pytest
57

68
import tcod.path
79

810

911
@pytest.mark.parametrize("order", ["C", "F"])
10-
def test_expensive_diagonal_heuristic(order: str) -> None:
12+
def test_expensive_diagonal_heuristic(order: Literal["C", "F"]) -> None:
1113
"""Eight cardinal steps beat the tempting nine-cost mixed route."""
1214
cost = np.array(
1315
[[1, 0, 0, 0, 1], [1, 1, 1, 1, 1], [1, 0, 1, 0, 1], [0, 1, 1, 1, 1], [0, 0, 1, 1, 1]],

0 commit comments

Comments
 (0)