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()