dingus
dingus copied to clipboard
A record-then-assert test double library.
Hi, I was interested to see how it works. After patching the original is not called anymore and I can see the calls. Fine. Two issues I've found: - the...
``` Here, d should be the patching dingus: >>> with dingus.patch('__builtin__.file') as d: ... print d ... None ```
Imported from BitBucket: Reported by Gary Bernhardt / garybernhardt, created 6 months ago. A method created with returns= records its calls: >>> d = Dingus(x__returns=5) >>> d.x() 5 >>> d.calls...
Imported from BitBucket: Reported by Anonymous, created 6 months ago. Specifically the syntax that replaces the has_key() method on dictionaries. ``` In [41]: d.has_key('str') Out[41]: In [42]: 'str' in d...
Imported from BitBucket: Reported by Anonymous, created 6 months ago. It doesn't seem possible to have a return element for getitem. For example: ``` from dingus import Dingus d =...
Imported from BitBucket
Imported from BitBucket: Reported by Gary Bernhardt / garybernhardt, created about a year ago. Off the top of my head, this should include file, open, exec, and execfile. There may...