Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Update README.mdHEADmaster | Zygmunt Krynicki | 2013-09-10 | 1 | -0/+2 |
| | | | Add travis build status image. | ||||
* | Fix PEP-8 issues in setup.py | Zygmunt Krynicki | 2013-09-10 | 1 | -3/+5 |
| | | | | Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | ||||
* | Merge pull request #1 from gustavofonseca/master | Zygmunt Krynicki | 2013-09-10 | 2 | -0/+8 |
|\ | | | | | Turning on the unittest's test runner right from setup.py script. Also, added the travis-ci config file | ||||
| * | Turning on the unittest's test runner right from setup.py script. Also, ↵ | Gustavo Fonseca | 2013-09-09 | 2 | -0/+8 |
|/ | | | | added the travis-ci config file. | ||||
* | gitignore: add .coverage | Zygmunt Krynicki | 2012-10-22 | 1 | -0/+1 |
| | |||||
* | apply 1.1.1 patches | Zygmunt Krynicki | 2012-10-22 | 2 | -2/+6 |
| | | | | | | | This simply bumps the version to 1.1.1 and adds myself as the maintainer to both setup and mocker.__credits__ Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com> | ||||
* | Add .gitignore | Zygmunt Krynicki | 2012-10-22 | 1 | -0/+3 |
| | |||||
* | Add skeleton README.md | Zygmunt Krynicki | 2012-10-22 | 1 | -0/+12 |
| | |||||
* | Introduced the more natural reading assertIsNotInstance(). | Gustavo Niemeyer | 2010-09-18 | 2 | -1/+6 |
| | |||||
* | Added assertRaisesRegexp() to MockerTestCase. It works similarly to | Gustavo Niemeyer | 2010-09-18 | 3 | -4/+141 |
| | | | | | the version in Python 2.7 and 3.2, except it will also return the error found. It also works as a context manager for with: statements. | ||||
* | - Implemented support for assertRaises() as a context manager, as in | Gustavo Niemeyer | 2010-09-18 | 3 | -15/+165 |
| | | | | | | Python 2.7 and 3.2. - Implemented assertIsInstance() and assertIsNotInstance() as well. - Updated NEWS file. | ||||
* | Tasks now have a may_run_user_code() method, which is used for tasks which | Gustavo Niemeyer | 2010-09-18 | 2 | -31/+159 |
| | | | | | | can potentially run unknown code or throw unknown exceptions. This is used by the Event.run() method to prevent running unknown logic when the event as a whole is already known to have failed. | ||||
* | Minor cleanups in the test suite. | Gustavo Niemeyer | 2010-09-18 | 1 | -9/+3 |
| | |||||
* | mocker.call() now supports a with_object argument. If True, the called | Gustavo Niemeyer | 2010-07-29 | 3 | -4/+81 |
| | | | | | function will receive the patched or proxied object so that its state may be used or verified in checks. | ||||
* | Fixed duplicated line in NEWS file.1.0 | Gustavo Niemeyer | 2010-06-20 | 1 | -2/+0 |
| | |||||
* | Setting version and date in NEWS file. | Gustavo Niemeyer | 2010-06-20 | 1 | -1/+1 |
| | |||||
* | Preparing to release version 1.0! | Gustavo Niemeyer | 2010-06-20 | 2 | -2/+2 |
| | |||||
* | MockerTestCase.assertRaises() will now return the exception raised, | Gustavo Niemeyer | 2010-06-20 | 3 | -0/+62 |
|\ | | | | | | | | | allowing further inspection of the raised exception (implemented by Thomas Hervé) (#299930). | ||||
| * | Return exception in failUnlessRaises, test it. | Thomas Hervé | 2008-11-19 | 2 | -0/+59 |
| | | |||||
* | | Fixed support for MockerTestCase.addCleanup() in Python 2.3, | Gustavo Niemeyer | 2010-06-20 | 3 | -1/+51 |
| | | | | | | | | by Anders F Björklund (#528657). | ||||
* | | Unwrap bound methods on replace() and proxy(), as suggested | Gustavo Niemeyer | 2010-06-20 | 3 | -0/+17 |
| | | | | | | | | by James Henstridge (#270782). | ||||
* | | Use the more reliable expect() automatically with MockerTestCase. | Gustavo Niemeyer | 2010-06-20 | 2 | -3/+7 |
| | | |||||
* | | Implemented Expect helper, which allows creating a new expect() | Gustavo Niemeyer | 2010-06-20 | 3 | -3/+35 |
| | | | | | | | | | | | | "function" with an explicitly provided Mocker instance. This helps in cases where the expression can't result in a Mock instance (e.g. expect(iter(mock))) (#196388). | ||||
* | | Added MockerTestCase to __all__. | Gustavo Niemeyer | 2010-06-20 | 2 | -1/+3 |
| | | |||||
* | | Applied change suggested by David Glick to avoid reimporting modules (#529675). | Gustavo Niemeyer | 2010-06-20 | 2 | -2/+6 |
| | | |||||
* | | Changed license to BSD, since the PSF license only applies to Python | Gustavo Niemeyer | 2010-06-20 | 3 | -263/+82 |
| | | | | | | | | itself (#583335). | ||||
* | | Updated NEWS file. | Gustavo Niemeyer | 2010-06-19 | 2 | -0/+11 |
| | | |||||
* | | Fixed support for Python 2.6. Mocking of iterators was broken in | Gustavo Niemeyer | 2010-06-19 | 2 | -1/+22 |
| | | | | | | | | | | certain cases because, even though that's *not* documented, Python tries to use __length_hint__ in some cases. | ||||
* | | __nonzero__ should necessarily return a boolean value, so transform Mock | Gustavo Niemeyer | 2010-03-15 | 2 | -1/+8 |
| | | | | | | | | results into True. | ||||
* | | Merged 328990-mocker-hides-exception branch from Duncan McGreggor. This | Gustavo Niemeyer | 2009-02-13 | 2 | -1/+17 |
|\ \ | |/ |/| | | | | | | | ensures that the raised AttributeError exception on a patched object actually exposes the real problem rather than an internal Mocker exception. | ||||
| * | - Added a new unit test to check for a bug in mocker where the original | Duncan McGreggor | 2009-02-13 | 2 | -1/+16 |
|/ | | | | | attribute gets swallowed by a subsequent exception check. - Added a fix for the bug. | ||||
* | Moved the __mocker_mock__ cleaning up test from Patcher into its | Gustavo Niemeyer | 2008-07-01 | 1 | -2/+8 |
| | | | | own method around the Mocker.patch() tests. | ||||
* | Merging branch from Thomas which changes Mocker.patch() to use the | Gustavo Niemeyer | 2008-07-01 | 2 | -1/+3 |
|\ | | | | | | | | | patcher when setting __mocker_mock__, rather than setting it in a persistent way. | ||||
| * | Use the version that passes the landscape tests. Add a test for one of the fix. | Thomas Hervé | 2008-06-30 | 2 | -1/+4 |
| | | |||||
* | | Prevent the MockerTestCase base from leaving the mocker in replay mode | Gustavo Niemeyer | 2008-07-01 | 2 | -0/+28 |
|/ | | | | | | while the base class run() method runs, since this might have additional logic which touches mocked content (time.time() was one case). Thanks to Thomas for the initial debugging. | ||||
* | A couple of changes to better accomodate py3k changes. | Gustavo Niemeyer | 2008-03-28 | 1 | -2/+2 |
| | |||||
* | When cleaning up on MockerTestCase, use reset() rather than restore(), | Gustavo Niemeyer | 2008-03-28 | 2 | -1/+12 |
| | | | | | so that the same test case instance may be run more than once (like Trial does). | ||||
* | Fixed patching of objects which define __getattr__.0.10.1 | Gustavo Niemeyer | 2007-12-11 | 3 | -5/+81 |
| | |||||
* | Preparing to release 0.10.0.10 | Gustavo Niemeyer | 2007-12-09 | 2 | -2/+2 |
| | |||||
* | Orderer() is now implemented based on may_run() instead of matches(). | Gustavo Niemeyer | 2007-12-09 | 3 | -31/+70 |
| | | | | | If the event is run with may_run() False, a nice assertion error is raised with a nice debugging message. :-) | ||||
* | Introduced {Task,Event}.may_run() to improve replaying ordering | Gustavo Niemeyer | 2007-12-09 | 2 | -21/+115 |
| | | | | | logic. Now events which have may_run() true will be run before events which don't. | ||||
* | When the expression executed isn't exactly the same as the | Gustavo Niemeyer | 2007-12-09 | 3 | -7/+43 |
| | | | | | recorded events (e.g. when parameter matchers are used), show in the error message the real expression run, to aid in debugging. | ||||
* | Fixed problem when requesting order on similar expressions. The | Gustavo Niemeyer | 2007-12-09 | 3 | -13/+34 |
| | | | | second expression might not be accepted. | ||||
* | MockerTestCase.makeFile() with content=None (the default) now | Gustavo Niemeyer | 2007-12-07 | 3 | -8/+17 |
| | | | | | consistently returns an unexistent temporary filename which is properly cleaned up if created. | ||||
* | New 'path' option to MockerTestCase.makeFile() and makeDir(), | Gustavo Niemeyer | 2007-12-05 | 3 | -15/+47 |
| | | | | which allows setting the full target path with a single option. | ||||
* | New MATCH() argument matcher, which allows using a function | Gustavo Niemeyer | 2007-12-05 | 3 | -3/+28 |
| | | | | to match an argument generically. E.g. MATCH(lambda x: x > 10) | ||||
* | Implemented MockerTestCase.addCleanup(). It allows one to | Gustavo Niemeyer | 2007-12-05 | 3 | -21/+47 |
| | | | | | register cleanup functions to be called after the test is complete. | ||||
* | Now when a spec is provided (or with proxy/replace/patch) the | Gustavo Niemeyer | 2007-12-04 | 3 | -0/+26 |
| | | | | | existence of the real method is checked even if the mocked method doesn't have to execute (e.g. due to count(0)). | ||||
* | MockerTestCase now verifies if the mocker is put in replay | Gustavo Niemeyer | 2007-12-04 | 3 | -1/+30 |
| | | | | mode in cases where events were recorded. | ||||
* | Implemented support for Deferred results as understood by | Gustavo Niemeyer | 2007-12-04 | 3 | -6/+65 |
| | | | | | Twisted Trial's TestCase, so that coexistence by multiple inheritance is possible and trivial. |