Introducing kgb, the spy agency for Python unit tests.
Review Request #4159 — Created May 22, 2013 and submitted
Introducing kgb, the spy agency for Python unit tests. kgb provides Jasmine-like spy functionality for Python unit tests. It makes it very easy to spy on functions, block access to them, reroute to fake functions, check on calls, and so on. This is a simple Python module with no dependencies. It's trivial to use, fully documented, and awesome.
Wrote lots of unit tests for it, which pass.
Description | From | Last Updated |
---|---|---|
there's an extra "the" in here. |
david | |
Can you swap the order of call_original and call_fake, just so the one that takes priority comes first? |
david | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (86 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 1 E124 closing bracket does not match visual indentation |
reviewbot | |
Col: 80 E501 line too long (87 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (86 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 1 E124 closing bracket does not match visual indentation |
reviewbot |
- Change Summary:
-
* Fixed spying on plain functions. This required a lot of evil, but works! Details in the code. * Added a "calls" property. * Reordered the call_* parameters to FunctionSpy. * Fixed an extra "the" in docs. Note that the interdiff is kinda busted.. Looks like the recent improvements have problems.