From 83bd448e8597d61dbf9eacd8b3790e2e3bfeebbd Mon Sep 17 00:00:00 2001 From: Maximos Nikiforakis Date: Wed, 28 Feb 2024 08:57:21 +0200 Subject: [PATCH] Rename _subject_result to _subjectResult --- src/unittest_extensions/case.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/unittest_extensions/case.py b/src/unittest_extensions/case.py index 01d4ed4..a90d931 100644 --- a/src/unittest_extensions/case.py +++ b/src/unittest_extensions/case.py @@ -56,8 +56,8 @@ def result(self) -> Any: decorator. """ try: - self._subject_result = self.subject(**self._subjectKwargs) - return self._subject_result + self._subjectResult = self.subject(**self._subjectKwargs) + return self._subjectResult except Exception as e: msg = e.args[0] if "subject() got an unexpected keyword argument" in msg: @@ -85,11 +85,11 @@ def cachedResult(self) -> Any: The returned object is a copy of the result. Thus, the result cannot be mutated by mutating the returned object of this method. """ - if not hasattr(self, "_subject_result"): + if not hasattr(self, "_subjectResult"): raise TestError("Cannot call 'cachedResult' before calling 'result'") # NOTE: deepcopy keeps a reference of the copied object. This can cause # issues with memory. - return deepcopy(self._subject_result) + return deepcopy(self._subjectResult) def assertResult(self, value): """