Skip to content

Commit f056e89

Browse files
committed
refactoring
1 parent 59e212f commit f056e89

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doublex/doubles.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ def _get_method(self, key):
189189

190190

191191
def method_returning(value):
192-
with Spy() as stub:
193-
method = Method(stub, 'orphan')
192+
with Spy() as spy:
193+
method = Method(spy, 'orphan')
194194
method(ANY_ARG).returns(value)
195195
return method
196196

197197

198198
def method_raising(exception):
199-
with Spy() as stub:
200-
method = Method(stub, 'orphan')
199+
with Spy() as spy:
200+
method = Method(spy, 'orphan')
201201
method(ANY_ARG).raises(exception)
202202
return method

doublex/internal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def notify(self, *args, **kargs):
9292
class Method(Observable):
9393
def __init__(self, double, name):
9494
super(Method, self).__init__()
95+
# FIXME: assert isinstance(double, Stub)
9596
self.double = double
9697
self.name = name
9798
self.__name__ = name

0 commit comments

Comments
 (0)