summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
smiddlek [Fri, 16 Nov 2012 19:17:52 +0000 (19:17 +0000)]
Patch for Issue #47, provided by gps@google.com
git-svn-id: http://pymox.googlecode.com/svn/trunk@75
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 12 Nov 2012 18:59:51 +0000 (18:59 +0000)]
Patch for Issue 51, contributed by matt@ihavethememo.net
git-svn-id: http://pymox.googlecode.com/svn/trunk@74
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 1 May 2012 21:27:35 +0000 (21:27 +0000)]
Patch for Issue 42 (Allow MoxMetaTestBase to be used with other metaclasses).
Thanks dbronner@google.com
git-svn-id: http://pymox.googlecode.com/svn/trunk@73
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 1 May 2012 20:43:51 +0000 (20:43 +0000)]
Patch for Issue 16 from Ben Love. Thanks!
git-svn-id: http://pymox.googlecode.com/svn/trunk@72
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 28 Nov 2011 18:27:06 +0000 (18:27 +0000)]
Patch for Issue 5438051
git-svn-id: http://pymox.googlecode.com/svn/trunk@70
b1010a0a-674b-0410-b734-
77272b80c875
stevepm@google.com [Tue, 28 Jun 2011 14:27:07 +0000 (14:27 +0000)]
Fix for broken logic when doing method signature matching and the
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
smiddlek [Mon, 6 Jun 2011 19:13:18 +0000 (19:13 +0000)]
Patch for adding a Comparator that can remember values from liulk@google.com.
http://codereview.appspot.com/4527043/
git-svn-id: http://pymox.googlecode.com/svn/trunk@65
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 6 Jun 2011 18:56:52 +0000 (18:56 +0000)]
Patch for Issue 30.
git-svn-id: http://pymox.googlecode.com/svn/trunk@64
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 6 Jun 2011 18:43:05 +0000 (18:43 +0000)]
Patch for Issue 35.
git-svn-id: http://pymox.googlecode.com/svn/trunk@63
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 6 Jun 2011 18:36:37 +0000 (18:36 +0000)]
git-svn-id: pymox.googlecode.com/svn/trunk@62
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Wed, 20 Oct 2010 18:35:14 +0000 (18:35 +0000)]
Clean up missed conversion from _expected_seq to _expected_list
git-svn-id: http://pymox.googlecode.com/svn/trunk@61
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Fri, 3 Sep 2010 17:00:55 +0000 (17:00 +0000)]
+ Fix for checking the method signature of unbound functions when keyword args
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
smiddlek [Mon, 23 Aug 2010 17:20:31 +0000 (17:20 +0000)]
Fix for Issue 19 by greatred
git-svn-id: http://pymox.googlecode.com/svn/trunk@59
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Mon, 23 Aug 2010 00:26:30 +0000 (00:26 +0000)]
Patch from Matt Brown (mdbrown@google) to make SameElementsAs more robust
git-svn-id: http://pymox.googlecode.com/svn/trunk@58
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Thu, 19 Aug 2010 17:29:46 +0000 (17:29 +0000)]
MockObject should have the __name__ param by default.
When stubbing with MockAnything, force the __name__ param
git-svn-id: http://pymox.googlecode.com/svn/trunk@57
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Thu, 19 Aug 2010 13:02:12 +0000 (13:02 +0000)]
git-svn-id: pymox.googlecode.com/svn/trunk@56
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Wed, 18 Aug 2010 21:18:37 +0000 (21:18 +0000)]
Fix for issue #27 by stevepm@google.com / steve.middlekauff@gmail.com
git-svn-id: http://pymox.googlecode.com/svn/trunk@55
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Sat, 10 Jul 2010 18:29:52 +0000 (18:29 +0000)]
Fix for issue 21:
+ 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
smiddlek [Wed, 7 Jul 2010 17:48:13 +0000 (17:48 +0000)]
Add an Is() comparator for checking identity, instead of equality.
By: vmalloc
git-svn-id: http://pymox.googlecode.com/svn/trunk@53
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Wed, 7 Jul 2010 17:43:04 +0000 (17:43 +0000)]
Adding a "fix" (cough, hack!) for method signature validation when
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
smiddlek [Thu, 17 Jun 2010 19:54:28 +0000 (19:54 +0000)]
Added column to AttributeError string to delimt error from
arguments, per issue 20.
git-svn-id: http://pymox.googlecode.com/svn/trunk@51
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Thu, 17 Jun 2010 19:45:51 +0000 (19:45 +0000)]
Allow methods that are stubbed out on class instances to have their
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
dglasser [Tue, 18 May 2010 17:48:59 +0000 (17:48 +0000)]
Give MockAnything a more useful __repr__.
git-svn-id: http://pymox.googlecode.com/svn/trunk@49
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Wed, 12 May 2010 18:19:01 +0000 (18:19 +0000)]
MoxAnything should not implement the method __str__, otherwise callers won't be
able to mock __str__ calls.
git-svn-id: http://pymox.googlecode.com/svn/trunk@48
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 4 May 2010 19:50:58 +0000 (19:50 +0000)]
git-svn-id: pymox.googlecode.com/svn/trunk@45
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Fri, 30 Apr 2010 20:59:35 +0000 (20:59 +0000)]
Add StubOutClassWithMocks, which acts as a "generator" for mock
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
smiddlek [Thu, 22 Apr 2010 23:05:27 +0000 (23:05 +0000)]
Fix a bug where the interface is not enforced when stubbing out a first 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
smiddlek [Tue, 20 Apr 2010 23:47:16 +0000 (23:47 +0000)]
Long over due patch from alan.franzoni for better property support (Issue 11).
I'm very sorry about the delay.
git-svn-id: http://pymox.googlecode.com/svn/trunk@42
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 6 Apr 2010 19:52:13 +0000 (19:52 +0000)]
Increment version number to 0.5.2 for new release.
git-svn-id: http://pymox.googlecode.com/svn/trunk@41
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Thu, 18 Mar 2010 17:04:35 +0000 (17:04 +0000)]
Thanks to matthew.blain@google.com for ContainsAttributeValue comparator
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
smiddlek [Fri, 8 Jan 2010 23:55:35 +0000 (23:55 +0000)]
Slightly modified (for style) patch submitted by alan.franzoni to
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
smiddlek [Fri, 11 Sep 2009 19:57:51 +0000 (19:57 +0000)]
Numerous fixes from Google:
* 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
smiddlek [Tue, 5 May 2009 23:22:21 +0000 (23:22 +0000)]
Mox release 0.5.1, which includes some bug fixes and tests for stubout.
git-svn-id: http://pymox.googlecode.com/svn/trunk@30
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 5 May 2009 22:54:33 +0000 (22:54 +0000)]
Fix for Issue 3, submitted by a...@therobots.org.
git-svn-id: http://pymox.googlecode.com/svn/trunk@29
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Fri, 20 Mar 2009 17:03:34 +0000 (17:03 +0000)]
Fix for Issue 5, submitted by agoratim.
git-svn-id: http://pymox.googlecode.com/svn/trunk@28
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Wed, 12 Nov 2008 19:01:43 +0000 (19:01 +0000)]
Patch from Matt Brown (mdbrow@gmail.com) to inspect the arguments of mocked methods. Alright! :)
git-svn-id: http://pymox.googlecode.com/svn/trunk@26
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Fri, 24 Oct 2008 00:51:29 +0000 (00:51 +0000)]
Added support for __contains__, thanks to Adam Lowry.
git-svn-id: http://pymox.googlecode.com/svn/trunk@25
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 19 Aug 2008 21:29:14 +0000 (21:29 +0000)]
Added import for inspect, and tests for stubout. Patch by Manuel Holtgrewe.
A stubout_testee.py
A stubout_test.py
M stubout.py
git-svn-id: http://pymox.googlecode.com/svn/trunk@24
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 1 Jul 2008 21:24:54 +0000 (21:24 +0000)]
Remove duplicate NotTest. Bad patch.
git-svn-id: http://pymox.googlecode.com/svn/trunk@19
b1010a0a-674b-0410-b734-
77272b80c875
smiddlek [Tue, 1 Jul 2008 20:47:46 +0000 (20:47 +0000)]
Add a Not comparator to compose with other comparators.
Patch by: Benoit Sigoure <benoits@google.com>
git-svn-id: http://pymox.googlecode.com/svn/trunk@18
b1010a0a-674b-0410-b734-
77272b80c875
dglasser [Tue, 1 Jul 2008 01:43:55 +0000 (01:43 +0000)]
Fix MoxTestBase to be usable with multiple-inheritance.
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
dglasser [Wed, 18 Jun 2008 23:30:15 +0000 (23:30 +0000)]
Write a README.
git-svn-id: http://pymox.googlecode.com/svn/trunk@12
b1010a0a-674b-0410-b734-
77272b80c875
dglasser [Tue, 17 Jun 2008 05:59:15 +0000 (05:59 +0000)]
Start our first release at 0.5.0, not 1.0.0.
git-svn-id: http://pymox.googlecode.com/svn/trunk@11
b1010a0a-674b-0410-b734-
77272b80c875
dglasser [Mon, 16 Jun 2008 21:30:12 +0000 (21:30 +0000)]
Include the mox_test_helper.py in the distribution.
git-svn-id: http://pymox.googlecode.com/svn/trunk@10
b1010a0a-674b-0410-b734-
77272b80c875
dglasser [Mon, 16 Jun 2008 21:04:49 +0000 (21:04 +0000)]
Fix mailing list address.
git-svn-id: http://pymox.googlecode.com/svn/trunk@8
b1010a0a-674b-0410-b734-
77272b80c875
dglasser [Fri, 13 Jun 2008 23:00:27 +0000 (23:00 +0000)]
Initial import of mox (originally an internal Google project).
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
(no author) [Mon, 21 Apr 2008 19:23:49 +0000 (19:23 +0000)]
Initial directory structure.
git-svn-id: http://pymox.googlecode.com/svn/trunk@1
b1010a0a-674b-0410-b734-
77272b80c875