diff options
author | Gustavo Niemeyer <gustavo@niemeyer.net> | 2007-12-04 23:56:34 -0200 |
---|---|---|
committer | Gustavo Niemeyer <gustavo@niemeyer.net> | 2007-12-04 23:56:34 -0200 |
commit | a902346fb27f6e70fe778a8eb3a8adc2145dee08 (patch) | |
tree | 14eda8d9269de1d0fe581ca83d32f39d1a30fbb2 /mocker.py | |
parent | dd13d97f602ebb08b0357701a6b22a7441c4abea (diff) | |
download | mocker-a902346fb27f6e70fe778a8eb3a8adc2145dee08.tar.gz |
Now when a spec is provided (or with proxy/replace/patch) the
existence of the real method is checked even if the mocked
method doesn't have to execute (e.g. due to count(0)).
Diffstat (limited to 'mocker.py')
-rw-r--r-- | mocker.py | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1780,6 +1780,10 @@ class SpecChecker(Task): raise AssertionError("Specification is %s%s: %s" % (self._method.__name__, spec, message)) + def verify(self): + if not self._method: + raise AssertionError("Method not found in real specification") + def run(self, path): if not self._method: raise AssertionError("Method not found in real specification") |