Skip to content

Commit 285a106

Browse files
committed
fix: Include all tests in pytest
1 parent fea2bfd commit 285a106

6 files changed

Lines changed: 5 additions & 5 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_from_arg():
1818

1919
def test_from_file():
2020
game_map = Map()
21-
game_map.load_from_file("game/tests/test_map.txt")
21+
game_map.load_from_file("game/tests/test_cli/test_map.txt")
2222

2323
assert game_map.map == [
2424
[False for _ in range(5)],
@@ -34,18 +34,18 @@ def test_from_arg_and_from_file_are_identical():
3434
game_map_from_arg.load_from_str("..... .### # ....# .")
3535

3636
game_map_from_file = Map()
37-
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")
3838

3939
assert game_map_from_arg.map == game_map_from_file.map
4040

4141

4242
def test_tui():
4343
game_map = Map()
44-
game_map.load_from_file("game/tests/cli/test_map.txt")
44+
game_map.load_from_file("game/tests/test_cli/test_map.txt")
4545

4646
display = prepare_display(game_map, state={"paused": False})
4747

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

5050
assert display == expected_display
5151

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)