summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Patch for Issue #47, provided by gps@google.comHEADmastersmiddlek2012-11-163-0/+59
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@75 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 51, contributed by matt@ihavethememo.netsmiddlek2012-11-122-4/+23
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@74 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 42 (Allow MoxMetaTestBase to be used with other metaclasses).smiddlek2012-05-011-0/+1
| | | | | | | | | Thanks dbronner@google.com git-svn-id: http://pymox.googlecode.com/svn/trunk@73 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 16 from Ben Love. Thanks!smiddlek2012-05-012-52/+233
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@72 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 5438051smiddlek2011-11-282-0/+29
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@70 b1010a0a-674b-0410-b734-77272b80c875
* Fix for broken logic when doing method signature matching and thestevepm@google.com2011-06-282-1/+32
| | | | | | | | | | 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
* Patch for adding a Comparator that can remember values from liulk@google.com.smiddlek2011-06-062-0/+86
| | | | | | | | http://codereview.appspot.com/4527043/ git-svn-id: http://pymox.googlecode.com/svn/trunk@65 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 30.smiddlek2011-06-061-2/+6
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@64 b1010a0a-674b-0410-b734-77272b80c875
* Patch for Issue 35.smiddlek2011-06-061-0/+2
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@63 b1010a0a-674b-0410-b734-77272b80c875
* git-svn-id: http://pymox.googlecode.com/svn/trunk@62 ↵smiddlek2011-06-062-4/+57
| | | | b1010a0a-674b-0410-b734-77272b80c875
* Clean up missed conversion from _expected_seq to _expected_listsmiddlek2010-10-201-1/+1
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@61 b1010a0a-674b-0410-b734-77272b80c875
* + Fix for checking the method signature of unbound functions when keyword argssmiddlek2010-09-033-14/+123
| | | | | | | | | 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
* Fix for Issue 19 by greatredsmiddlek2010-08-231-1/+7
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@59 b1010a0a-674b-0410-b734-77272b80c875
* Patch from Matt Brown (mdbrown@google) to make SameElementsAs more robustsmiddlek2010-08-232-7/+30
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@58 b1010a0a-674b-0410-b734-77272b80c875
* MockObject should have the __name__ param by default.smiddlek2010-08-191-7/+11
| | | | | | | | When stubbing with MockAnything, force the __name__ param git-svn-id: http://pymox.googlecode.com/svn/trunk@57 b1010a0a-674b-0410-b734-77272b80c875
* git-svn-id: http://pymox.googlecode.com/svn/trunk@56 ↵smiddlek2010-08-192-9/+16
| | | | b1010a0a-674b-0410-b734-77272b80c875
* Fix for issue #27 by stevepm@google.com / steve.middlekauff@gmail.comsmiddlek2010-08-183-4/+56
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@55 b1010a0a-674b-0410-b734-77272b80c875
* Fix for issue 21:smiddlek2010-07-102-2/+27
| | | | | | | | | | | + 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
* Add an Is() comparator for checking identity, instead of equality.smiddlek2010-07-072-0/+53
| | | | | | | | By: vmalloc git-svn-id: http://pymox.googlecode.com/svn/trunk@53 b1010a0a-674b-0410-b734-77272b80c875
* Adding a "fix" (cough, hack!) for method signature validation whensmiddlek2010-07-072-7/+77
| | | | | | | | | | 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
* Added column to AttributeError string to delimt error fromsmiddlek2010-06-171-1/+1
| | | | | | | | arguments, per issue 20. git-svn-id: http://pymox.googlecode.com/svn/trunk@51 b1010a0a-674b-0410-b734-77272b80c875
* Allow methods that are stubbed out on class instances to have theirsmiddlek2010-06-173-5/+38
| | | | | | | | | | | 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
* Give MockAnything a more useful __repr__.dglasser2010-05-181-1/+4
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@49 b1010a0a-674b-0410-b734-77272b80c875
* MoxAnything should not implement the method __str__, otherwise callers won't besmiddlek2010-05-122-3/+7
| | | | | | | | able to mock __str__ calls. git-svn-id: http://pymox.googlecode.com/svn/trunk@48 b1010a0a-674b-0410-b734-77272b80c875
* git-svn-id: http://pymox.googlecode.com/svn/trunk@45 ↵smiddlek2010-05-041-1/+1
| | | | b1010a0a-674b-0410-b734-77272b80c875
* Add StubOutClassWithMocks, which acts as a "generator" for mocksmiddlek2010-04-303-3/+250
| | | | | | | | | | | | | | | | | | | | | | | 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
* Fix a bug where the interface is not enforced when stubbing out a first ↵smiddlek2010-04-223-6/+33
| | | | | | | | | | 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
* Long over due patch from alan.franzoni for better property support (Issue 11).smiddlek2010-04-202-2/+20
| | | | | | | | I'm very sorry about the delay. git-svn-id: http://pymox.googlecode.com/svn/trunk@42 b1010a0a-674b-0410-b734-77272b80c875
* Increment version number to 0.5.2 for new release.smiddlek2010-04-061-1/+1
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@41 b1010a0a-674b-0410-b734-77272b80c875
* Thanks to matthew.blain@google.com for ContainsAttributeValue comparatorsmiddlek2010-03-183-16/+220
| | | | | | | | | 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
* Slightly modified (for style) patch submitted by alan.franzoni tosmiddlek2010-01-082-4/+50
| | | | | | | | | | | 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
* Numerous fixes from Google:smiddlek2009-09-112-57/+287
| | | | | | | | | | | | | | | | * 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
* Mox release 0.5.1, which includes some bug fixes and tests for stubout.smiddlek2009-05-052-1/+3
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@30 b1010a0a-674b-0410-b734-77272b80c875
* Fix for Issue 3, submitted by a...@therobots.org.smiddlek2009-05-052-0/+10
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@29 b1010a0a-674b-0410-b734-77272b80c875
* Fix for Issue 5, submitted by agoratim.smiddlek2009-03-201-2/+5
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@28 b1010a0a-674b-0410-b734-77272b80c875
* Patch from Matt Brown (mdbrow@gmail.com) to inspect the arguments of mocked ↵smiddlek2008-11-122-5/+250
| | | | | | methods. Alright! :) git-svn-id: http://pymox.googlecode.com/svn/trunk@26 b1010a0a-674b-0410-b734-77272b80c875
* Added support for __contains__, thanks to Adam Lowry.smiddlek2008-10-242-0/+71
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@25 b1010a0a-674b-0410-b734-77272b80c875
* Added import for inspect, and tests for stubout. Patch by Manuel Holtgrewe.smiddlek2008-08-193-0/+51
| | | | | | | | | 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
* Remove duplicate NotTest. Bad patch.smiddlek2008-07-011-16/+0
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@19 b1010a0a-674b-0410-b734-77272b80c875
* Add a Not comparator to compose with other comparators.smiddlek2008-07-012-0/+66
| | | | | | | | Patch by: Benoit Sigoure <benoits@google.com> git-svn-id: http://pymox.googlecode.com/svn/trunk@18 b1010a0a-674b-0410-b734-77272b80c875
* Fix MoxTestBase to be usable with multiple-inheritance.dglasser2008-07-012-0/+21
| | | | | | | | | | 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
* Write a README.dglasser2008-06-181-1/+56
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@12 b1010a0a-674b-0410-b734-77272b80c875
* Start our first release at 0.5.0, not 1.0.0.dglasser2008-06-171-1/+1
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@11 b1010a0a-674b-0410-b734-77272b80c875
* Include the mox_test_helper.py in the distribution.dglasser2008-06-162-1/+2
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@10 b1010a0a-674b-0410-b734-77272b80c875
* Fix mailing list address.dglasser2008-06-161-2/+1
| | | | git-svn-id: http://pymox.googlecode.com/svn/trunk@8 b1010a0a-674b-0410-b734-77272b80c875
* Initial import of mox (originally an internal Google project).dglasser2008-06-138-0/+3157
| | | | | | | | 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
* Initial directory structure.(no author)2008-04-210-0/+0
git-svn-id: http://pymox.googlecode.com/svn/trunk@1 b1010a0a-674b-0410-b734-77272b80c875