From ed809bf293efa00b3aadd3a2223016771bd53e0f Mon Sep 17 00:00:00 2001 From: Perry Goy Date: Tue, 20 Feb 2024 16:08:54 -0600 Subject: [PATCH] #126: fix MakeNote.key_to_log not being updated. (#129) --- screenpy/actions/make_note.py | 2 ++ tests/test_actions.py | 1 + 2 files changed, 3 insertions(+) diff --git a/screenpy/actions/make_note.py b/screenpy/actions/make_note.py index 2a57a64..10ecc2f 100644 --- a/screenpy/actions/make_note.py +++ b/screenpy/actions/make_note.py @@ -37,6 +37,7 @@ class MakeNote: """ key: str | None + key_to_log: str | None question: T_Q @classmethod @@ -56,6 +57,7 @@ def of_the(cls, question: T_Q) -> Self: def as_(self, key: str) -> Self: """Set the key to use to recall this noted value.""" self.key = key + self.key_to_log = represent_prop(key) return self def describe(self) -> str: diff --git a/tests/test_actions.py b/tests/test_actions.py index a982f1f..c310244 100644 --- a/tests/test_actions.py +++ b/tests/test_actions.py @@ -384,6 +384,7 @@ def test_key_value_set(self) -> None: assert mn.question == test_question assert mn.key == test_key + assert mn.key_to_log == f"'{test_key}'" def test_answers_question(self, Tester: Actor) -> None: mock_question = FakeQuestion()