Skip to content

Commit d5f6d58

Browse files
committed
Minor test fixes
1 parent ac5ce54 commit d5f6d58

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

automation/templates/bestiary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def make_pc_img(
553553
html_str=self._html(items),
554554
save_as=filename,
555555
)
556-
logger.info(f"Wrote HTML as image: {filename}")
556+
logger.info(f"Wrote HTML as image: {hti.output_path}/{filename}")
557557

558558
@property
559559
def csv_dict(self) -> dict:

notebooks/py_scripts/Encounters.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,3 @@
130130
# !head automation/_output/log_draws.csv
131131

132132
# !head automation/_output/log_rests.csv
133-
134-

notebooks/py_scripts/Powers_and_Bestiary.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,3 @@
116116
out_delim="\t", # CSV delimiter - "," is also available
117117
)
118118
# -
119-
120-

tests/test_sim_player.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from pathlib import Path
2+
3+
14
def ul_dict(n):
25
return {"upper_lower_int": n}
36

@@ -17,6 +20,13 @@ def test_player_repr(sample_player):
1720
assert item in sample_player.__repr__()
1821

1922

23+
def test_player_img(setup, sample_player):
24+
_, _, test_data_dir = setup
25+
img_path = Path("./" + test_data_dir).absolute()
26+
sample_player.make_pc_img(file_path=str(img_path))
27+
assert Path(img_path / sample_player._pc_file_info("png")[1]).exists()
28+
29+
2030
def test_statuses(sample_player):
2131
sample_player._statuses.update({"Entangled": 1, "Knocked Down": 1, "Frozen": 1})
2232
assert sample_player._apply_upper_lower("check", {}, skill="AGL") == ul_dict(-3)
@@ -43,10 +53,10 @@ def test_fatigue(sample_player):
4353

4454

4555
def test_return_string(sample_card, sample_player):
46-
assert "with TR" in sample_player.check_by_skill(
56+
assert "with DR" in sample_player.check_by_skill(
4757
TC=sample_card, DR=3, return_string=True
4858
)
49-
assert "with TR" in sample_player.save(DR=3, return_string=True)
59+
assert "with DR" in sample_player.save(DR=3, return_string=True)
5060
assert "rested" in sample_player.full_rest(return_string=True)
5161
assert "during Quick" in sample_player.quick_rest(return_string=True)
5262

0 commit comments

Comments
 (0)