summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
Commit message (Collapse)AuthorAgeFilesLines
...
* | Issue #23731: Implement PEP 488.Brett Cannon2015-04-131-2/+2
| | | | | | | | | | | | The concept of .pyo files no longer exists. Now .pyc files have an optional `opt-` tag which specifies if any extra optimizations beyond the peepholer were applied.
* | Issue #22903: The fake test case created by unittest.loader when it fails ↵Antoine Pitrou2015-03-182-10/+34
|\ \ | |/ | | | | importing a test module is now picklable.
| * Issue #22903: The fake test case created by unittest.loader when it fails ↵Antoine Pitrou2015-03-182-9/+29
| | | | | | | | importing a test module is now picklable.
* | Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-142-1/+18
|\ \ | |/ | | | | Patch by Håkan Lövdahl.
| * Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-142-1/+18
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #23581: Add matmul support to MagicMock.Berker Peksag2015-03-122-1/+12
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #22936: Allow showing local variables in unittest errors.Robert Collins2015-03-067-25/+97
| |
* | unittest: Trivial typo fix.Robert Collins2015-03-051-1/+1
| |
* | Issue #23326: Removed __ne__ implementations. Since fixing default __ne__Serhiy Storchaka2015-01-311-4/+0
| | | | | | | | implementation in issue #21408 they are redundant.
* | Issue #21408: The default __ne__() now returns NotImplemented if __eq__()Serhiy Storchaka2015-01-262-6/+0
|\ \ | |/ | | | | returned NotImplemented. Removed incorrect implementations of __ne__().
| * Issue #21408: The default __ne__() now returns NotImplemented if __eq__()Serhiy Storchaka2015-01-262-6/+0
| | | | | | | | returned NotImplemented. Removed incorrect implementations of __ne__().
* | Issue #22823: Fix typo in unittest/mock.pyVictor Stinner2014-12-111-1/+1
| |
* | Issue #22823: Use set literals instead of creating a set from a list.Serhiy Storchaka2014-12-111-16/+15
| | | | | | | | Fixed an output of sets in examples.
* | Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵Antoine Pitrou2014-11-232-1/+30
|\ \ | |/ | | | | when in failfast mode, even in the absence of failures.
| * Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵Antoine Pitrou2014-11-232-1/+30
| | | | | | | | when in failfast mode, even in the absence of failures.
* | Fix regression in issue 22457 fix.Robert Collins2014-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | When used in the real world it can under some situations trigger " assert not _relpath.startswith('..'), "Path must be within the project" AssertionError: Path must be within the project " Because _get_name_from_path was not expecting to be called with the top level directory.
* | Close #22457: Honour load_tests in the start_dir of discovery.Robert Collins2014-11-044-58/+160
| | | | | | | | | | | | We were not honouring load_tests in a package/__init__.py when that was the start_dir parameter, though we do when it is a child package. The fix required a little care since it introduces the possibility of infinite recursion.
* | Close #7559: ImportError when loading a test now shown as ImportError.Robert Collins2014-10-292-105/+181
| | | | | | | | | | | | | | Previously the ImportError was only shown if the top level containing package failed to import, with other ImportErrors showing up as AttributeError - hiding the real cause. As part of this, `TestLoader.loadTestsFromNames` now captures errors to self.errors.
* | Close #22756: Improve the test output for some assertEqual tests.Robert Collins2014-10-291-5/+3
| | | | | | | | | | | | These tests were undebuggable as written, and there's no testing fallacy involved in using the method we're testing to test the output of that method, so switch to that.
* | Close #19746: expose unittest discovery errors on TestLoader.errorsRobert Collins2014-10-203-9/+52
| | | | | | | | | | | | This makes it possible to examine the errors from unittest discovery without executing the test suite - important when the test suite may be very large, or when enumerating the test ids from a test suite.
* | Issue #22186: Fix typos in Lib/.Berker Peksag2014-10-191-1/+1
|\ \ | |/ | | | | Patch by Févry Thibault.
| * Issue #22186: Fix typos in Lib/.Berker Peksag2014-10-191-1/+1
| | | | | | | | Patch by Févry Thibault.
* | fix windows tests (#16662)Benjamin Peterson2014-09-301-14/+15
| | | | | | | | From Robert Collins.
* | Closes #21270 : We now override tuple methods in mock.call objects.Kushal Das2014-09-162-0/+16
| |
* | A few tweaks for issue16662 based on feedback from Robert Collins.Barry Warsaw2014-09-082-38/+46
| |
* | - Issue #16662: load_tests() is now unconditionally run when it is present inBarry Warsaw2014-09-083-33/+427
| | | | | | | | | | | | | | a package's __init__.py. TestLoader.loadTestsFromModule() still accepts use_load_tests, but it is deprecated and ignored. A new keyword-only attribute `pattern` is added and documented. Patch given by Robert Collins, tweaked by Barry Warsaw.
* | #22092: merge with 3.4.Ezio Melotti2014-08-077-5/+8
|\ \ | |/
| * #22092: use absolute imports in unittest tests. Patch by Vajrasky Kok.Ezio Melotti2014-08-077-5/+8
| |
* | Issue #22032: __qualname__ instead of __name__ is now always used to formatSerhiy Storchaka2014-07-222-4/+5
| | | | | | | | fully qualified class names of Python implemented classes.
* | Suppress a couple more DeprecationWarnings in the test suite.R David Murray2014-06-111-1/+1
| |
* | Closes #21256: Printout of keyword args in deterministic order in mock calls.Kushal Das2014-06-092-1/+7
| | | | | | | | | | Printout of keyword args should be in deterministic order in a mock function call. This will help to write better doctests.
* | Issue #9815: assertRaises now tries to clear references to local variables ↵Antoine Pitrou2014-04-282-0/+34
|\ \ | |/ | | | | in the exception's traceback.
| * Issue #9815: assertRaises now tries to clear references to local variables ↵Antoine Pitrou2014-04-282-0/+34
| | | | | | | | in the exception's traceback.
* | Issue8297: module attribute lookup failures now include module name in error ↵Ethan Furman2014-04-241-5/+5
| | | | | | | | message.
* | Fix typo in test method name.Mark Dickinson2014-04-181-1/+1
| |
* | Removes unused varargs and varkwargs from assert_not_called().Kushal Das2014-04-161-1/+1
| |
* | Closes Issue 21262: New method assert_not_called for Mock.Kushal Das2014-04-162-0/+17
| | | | | | | | It raises AssertionError if the mock has been called.
* | Closes Issue 21238: New keyword argument `unsafe` to Mock.Kushal Das2014-04-162-2/+17
| | | | | | | | | | It raises `AttributeError` incase of an attribute startswith assert or assret.
* | MergeMichael Foord2014-04-152-6/+28
|\ \ | |/
| * Closes issue 21239. unittest.mock.patch.stopall() did not work ↵Michael Foord2014-04-152-6/+28
| | | | | | | | deterministically when the same name was patched multiple times.
* | MergeKushal Das2014-04-152-0/+6
|\ \ | |/
| * Closes Issue 21222.Kushal Das2014-04-152-0/+6
| | | | | | | | Passing name keyword argument to mock.create_autospec now works.
* | Closes issue 17660. You no longer need to explicitly pass create=True when ↵Michael Foord2014-04-142-2/+29
|/ | | | patching builtin names.
* Issue 17826. Setting an iterable side_effect on a mock created by ↵Michael Foord2014-04-142-2/+31
| | | | create_autospec now works
* Issue 20968. unittest.mock.MagicMock now supports divisionMichael Foord2014-04-142-1/+28
|
* backport: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.R David Murray2014-03-252-1/+13
| | | | | | | Previously a non-string, non-regex second argument and missing callable argument could cause the test to appear to always pass. Initial patch by Kamilla Holanda.
* Issue #20189: Four additional builtin types (PyTypeObject,Larry Hastings2014-01-241-3/+16
| | | | | | PyMethodDescr_Type, _PyMethodWrapper_Type, and PyWrapperDescr_Type) have been modified to provide introspection information for builtins. Also: many additional Lib, test suite, and Argument Clinic fixes.
* Fixes Issue #20165: The unittest module no longer considers tests marked withGregory P. Smith2014-01-202-5/+10
| | | | @expectedFailure successful if they pass.
* Fix breakage in TestSuite.countTestCases() introduced by issue #11798.Antoine Pitrou2013-12-282-4/+43
|
* Remove commented out debugging code (remnants of issue #18996).Serhiy Storchaka2013-12-101-2/+0
|