0
I Use This!
Inactive

Commits : Listings

Analyzed 1 minute ago. based on code collected 2 minutes ago.
Apr 07, 2025 — Apr 07, 2026
Commit Message Contributor Files Modified Lines Added Lines Removed Code Location Date
- Warn explicitly against passing in a string to the methodNames parameter of mockGetAllCalls as I made the same mistake a couple of times, and I'm sure others will as well. - Use inheritance instead of a type attribute for the (now) 3 different types of MockCallable. - Added mock.MockRet class to allow easy specification of return values through kwargs. - Use assertEqual everywhere instead of mixture of that and assertEquals - Refactored the constraints ISINSTANCE, GT, NE, EQ etc so that they can be used as arguments to MockCall.checkNameArgs. i.e. for checking expectations on a recorded call rather than before the call is made. - Added an ANY() expectation constraint. - Generate an artificial __repr__ for mocks to improve some obscure debugging issues I had. - Updates to the documentation. - Added assertEmpty to MockCallIterator. More... over 18 years ago
- extracted a checkNameArgs method from the MockCall class. - added optional methodNames parameter to mockGetAllCalls I could get a particular subset of the calls in order - added MockCallIter to avoid having to renumber call indices whenever an expected call was added or removed except at the end. More... almost 19 years ago
- Lots of improvements to the nim pygame example of module mocking. - It actually plays a human versus computer game of nim now. - Split out tests into test subdirectory. - Demo running of _all_ the tests in a particular suite after all the mock modules are prepared. - Don't import mocked modules until we're inside setUp() otherwise we can't roll back. More... over 19 years ago
added rsplit function to keep compatible with pre-2.4 python More... over 20 years ago
- Mostly added example code for module mocking. - There are a couple of tests failing in the example code. - The failures appear to be order dependent; running pygameviewtest.py and controllertest sequentially in separate processes appears to be a work around. More... over 20 years ago
- Fixed __doc__ for the mock module since it became a package. - First cut at package and sub-package support - A few more tests for package support - Still needs more tests - rollbackImporter -> _rollbackImporter - Rename test* to test_* for potentially testing with py.test. - New test for unmocking a module that was imported prior to mocking. More... over 20 years ago
- Warnings about unwrapModule More... over 20 years ago
Moved to new doc directory. More... over 20 years ago
- Moved existing mock module into a mock package - Test code to test directory - Doco to doco directory. - Added a distutils setup script - First cut at module mocking. - Updates to doco for module support - Doco fix: When inheriting from a Mock, don't need to call base method to record a call. - problems with docutils not using stylesheets, so I haven't removed the old mock.html. More... over 20 years ago
- Preparation for the addition of mockmodule. - Split out a MockRecorder class. - Allow sharing of a recorder instance between different Mock instances. - Can still transparently call recorder methods on a Mock instance. This uses explicit delegation methods that are set up on the Mock class. - Added a parameter to MockCall: the object - MockRecorder.mockGetAllCalls and mockGetNamedCalls take an optional obj param. - Fixed outdated comment about calling Mock.__getattr__ in doco. - Changed all ''' doc quotes to """ in unit tests. - from __future__ import generators in tests for compatibility with older python versions. - Removed useless TestMockCallable test class - Added tests for the new MockRecorder class. More... almost 21 years ago
- Updated. Mostly cosmetics. More... almost 21 years ago
- Renamed realClassMethods to mockRealClassMethods for consistency - Fixed number of parameters checking for staticmethods and classmethods - Convert all remaining docstrings to """ for consistency and for commenting out code with ''' - Replaced _findFunc function with call of getattr(class, name, None) More... almost 21 years ago
Added expectParam method and conditional functions. Added 'after' and 'until' parameters to mockSetExpectation. Updated the doc. More... almost 21 years ago
Initial revision More... almost 21 years ago