| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@75 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@74 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
| |
Thanks dbronner@google.com
git-svn-id: http://pymox.googlecode.com/svn/trunk@73 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@72 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
| |
first argument is a Comparator. The Comparator may raise an exception
(which is expected), and since exceptions aren't caught, this will
break well formed tests.
git-svn-id: http://pymox.googlecode.com/svn/trunk@66 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
http://codereview.appspot.com/4527043/
git-svn-id: http://pymox.googlecode.com/svn/trunk@65 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@64 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@63 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@61 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
| |
are passed as positional. With tests.
+ Made the comparator more robust by catching exceptions and returning False
git-svn-id: http://pymox.googlecode.com/svn/trunk@60 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@59 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@58 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
When stubbing with MockAnything, force the __name__ param
git-svn-id: http://pymox.googlecode.com/svn/trunk@57 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@55 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
|
| |
+ Add str() before assuming that types are strings in comparator
__repr__ functions.
+ Add some doc and formatting to the Is() comparator.
+ Add some tests that In() works properly when the key is a tuple.
git-svn-id: http://pymox.googlecode.com/svn/trunk@54 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
By: vmalloc
git-svn-id: http://pymox.googlecode.com/svn/trunk@53 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
| |
calling an unbound method with the instance as the first arg.
By Steve Middlekauff
git-svn-id: http://pymox.googlecode.com/svn/trunk@52 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
arguments, per issue 20.
git-svn-id: http://pymox.googlecode.com/svn/trunk@51 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
|
| |
signatures verified.
Initial patch submitted by vmalloc.
Slight modificants to tests by steve.middlekauff.
git-svn-id: http://pymox.googlecode.com/svn/trunk@50 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@49 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
able to mock __str__ calls.
git-svn-id: http://pymox.googlecode.com/svn/trunk@48 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects. This is useful for testing classes that directly
instantiate their dependencies. Previously, one would create yet
another mock that would act as a generator (effectively mocking
__init__ and returning an instance of a MockObject).
StubOutClassWithMocks handles the "generator" mock for you.
Example:
mox.StubOutClassWithMocks(my_import, 'FooClass')
mock1 = my_import.FooClass(1, 2) # Returns a new mock of FooClass
mock2 = my_import.FooClass(9, 10) # Returns another mock instance
mox.ReplayAll()
my_import.FooClass(1, 2) # Returns mock1 again.
my_import.FooClass(9, 10) # Returns mock2 again.
mox.VerifyAll()
git-svn-id: http://pymox.googlecode.com/svn/trunk@44 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
| |
order method,
or on the __call__ function of a callable object.
git-svn-id: http://pymox.googlecode.com/svn/trunk@43 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
I'm very sorry about the delay.
git-svn-id: http://pymox.googlecode.com/svn/trunk@42 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
| |
and Adeodato Simo for adding stubs to the MoxTestBase and fixing up some
of the tests.
git-svn-id: http://pymox.googlecode.com/svn/trunk@40 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
|
| |
support setting attributes on a MockObject from a dict supplied to the
constructor. This is more efficient than setting attrs by hand. Only
public attributes may be set.
git-svn-id: http://pymox.googlecode.com/svn/trunk@39 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added warning the Mox is not thread-safe - Steve Middlekauff
* Fix bug in MultipleTimes group where if a Func is used it is called
unnecessarily, due to re-comparing to see if the group has been
satisfied - Steve Middlekauff
* Use difflib for exceptions - Matt Brown
* Add support for mocking iterators - Adam Nadolski
* Make __getitem__, __setitem__, and __iter__ work with subclasses of
new style clases - Antoine Picard
git-svn-id: http://pymox.googlecode.com/svn/trunk@38 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@29 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
| |
methods. Alright! :)
git-svn-id: http://pymox.googlecode.com/svn/trunk@26 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
| |
git-svn-id: http://pymox.googlecode.com/svn/trunk@25 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
| |
Patch by: Benoit Sigoure <benoits@google.com>
git-svn-id: http://pymox.googlecode.com/svn/trunk@18 b1010a0a-674b-0410-b734-77272b80c875
|
|
|
|
|
|
|
|
|
|
| |
MoxTestBase was redefining setUp() but it didn't use super() to
call setUp recursively on the other parent classes defined in MRO.
Patch by: Benoit Sigoure <tsuna@lrde.epita.fr>
git-svn-id: http://pymox.googlecode.com/svn/trunk@17 b1010a0a-674b-0410-b734-77272b80c875
|
|
It's not quite ready for release yet, but it's been appropriately
scrubbed and relicensed.
git-svn-id: http://pymox.googlecode.com/svn/trunk@7 b1010a0a-674b-0410-b734-77272b80c875
|