Skip to content

Commit 83bd448

Browse files
committed
Rename _subject_result to _subjectResult
1 parent 02ab496 commit 83bd448

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/unittest_extensions/case.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def result(self) -> Any:
5656
decorator.
5757
"""
5858
try:
59-
self._subject_result = self.subject(**self._subjectKwargs)
60-
return self._subject_result
59+
self._subjectResult = self.subject(**self._subjectKwargs)
60+
return self._subjectResult
6161
except Exception as e:
6262
msg = e.args[0]
6363
if "subject() got an unexpected keyword argument" in msg:
@@ -85,11 +85,11 @@ def cachedResult(self) -> Any:
8585
The returned object is a copy of the result. Thus, the result cannot be
8686
mutated by mutating the returned object of this method.
8787
"""
88-
if not hasattr(self, "_subject_result"):
88+
if not hasattr(self, "_subjectResult"):
8989
raise TestError("Cannot call 'cachedResult' before calling 'result'")
9090
# NOTE: deepcopy keeps a reference of the copied object. This can cause
9191
# issues with memory.
92-
return deepcopy(self._subject_result)
92+
return deepcopy(self._subjectResult)
9393

9494
def assertResult(self, value):
9595
"""

0 commit comments

Comments
 (0)