Skip to content

Commit 18f9b17

Browse files
committed
fix: Include all tests in pytest
1 parent c841850 commit 18f9b17

File tree

6 files changed

+6
-5
lines changed

6 files changed

+6
-5
lines changed
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from game.utils.map import Map
22
from game.utils.tui import prepare_display
3+
from game.utils.cli import parse_multiple_value_argument_from_str
34

45

56
def test_from_arg():
@@ -17,7 +18,7 @@ def test_from_arg():
1718

1819
def test_from_file():
1920
game_map = Map()
20-
game_map.load_from_file("game/tests/test_map.txt")
21+
game_map.load_from_file("game/tests/test_cli/test_map.txt")
2122

2223
assert game_map.map == [
2324
[False for _ in range(5)],
@@ -33,18 +34,18 @@ def test_from_arg_and_from_file_are_identical():
3334
game_map_from_arg.load_from_str("..... .### # ....# .")
3435

3536
game_map_from_file = Map()
36-
game_map_from_file.load_from_file("game/tests/cli/test_map.txt")
37+
game_map_from_file.load_from_file("game/tests/test_cli/test_map.txt")
3738

3839
assert game_map_from_arg.map == game_map_from_file.map
3940

4041

4142
def test_tui():
4243
game_map = Map()
43-
game_map.load_from_file("game/tests/cli/test_map.txt")
44+
game_map.load_from_file("game/tests/test_cli/test_map.txt")
4445

4546
display = prepare_display(game_map, state={"paused": False})
4647

47-
expected_display = open("game/tests/cli/expected_display.txt").read()
48+
expected_display = open("game/tests/test_cli/expected_display.txt").read()
4849

4950
assert display == expected_display
5051

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ packages = ["game"]
2222
test = ["pytest"]
2323

2424
[tool.pytest.ini_options]
25-
testpaths = ["game/tests/*"]
25+
testpaths = ["game/tests"]
2626

2727
[project.scripts]
2828
game = "game.main:app"

0 commit comments

Comments
 (0)