Skip to content

Commit

Permalink
Rename _subject_result to _subjectResult
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxcode123 committed Feb 28, 2024
1 parent 02ab496 commit 83bd448
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/unittest_extensions/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit 83bd448

Please sign in to comment.