summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.Robert Collins2015-07-141-0/+3
|\ \ | |/ | | | | Patch from Nicola Palumbo and Laurent De Buyst.
| * - Issue #18622: unittest.mock.mock_open().reset_mock would recurse infinitely.Robert Collins2015-07-141-0/+3
| | | | | | | | Patch from Nicola Palumbo and Laurent De Buyst.
| * Reverted issue #24134 changes (except new tests).Serhiy Storchaka2015-05-161-11/+0
| |
* | Issue #23661: unittest.mock side_effects can now be exceptions again.Robert Collins2015-07-141-0/+9
| | | | | | | | This was a regression vs Python 3.4. Patch from Ignacio Rossi
* | Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-211-0/+56
| | | | | | | | | | assertWarnsRegex() assertments now check the type of the first argument to prevent possible user error. Based on patch by Daniel Wagner-Hall.
* | Issue #24245: Eliminated senseless expect clauses that have no any effect.Serhiy Storchaka2015-05-201-4/+0
| | | | | | | | Patch by Martin Panter.
* | Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-161-4/+40
| | | | | | | | | | assertWarnsRegex() checks now emits a deprecation warning when callable is None or keyword arguments except msg is passed in the context manager mode.
* | Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-061-0/+52
|\ \ | |/ | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises().
| * Issue #24134: assertRaises(), assertRaisesRegex(), assertWarns() andSerhiy Storchaka2015-05-061-0/+52
| | | | | | | | | | | | assertWarnsRegex() checks are not longer successful if the callable is None. Added tests for assertRaises().
| * Issue #23310: Fix MagicMock's initializer to work with __methods__.Łukasz Langa2015-04-141-0/+15
| | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
* | Issue #23310: Fix MagicMock's initializer to work with __methods__.Łukasz Langa2015-04-141-0/+15
| | | | | | | | Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
* | Issue #22903: The fake test case created by unittest.loader when it fails ↵Antoine Pitrou2015-03-181-0/+13
|\ \ | |/ | | | | importing a test module is now picklable.
| * Issue #22903: The fake test case created by unittest.loader when it fails ↵Antoine Pitrou2015-03-181-0/+9
| | | | | | | | importing a test module is now picklable.
* | Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-0/+15
|\ \ | |/ | | | | Patch by Håkan Lövdahl.
| * Issue #23568: Add rdivmod support to MagicMock() objects.Berker Peksag2015-03-141-0/+15
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #23581: Add matmul support to MagicMock.Berker Peksag2015-03-121-0/+11
| | | | | | | | Patch by Håkan Lövdahl.
* | Issue #22936: Allow showing local variables in unittest errors.Robert Collins2015-03-064-16/+66
| |
* | Issue #22894: TestCase.subTest() would cause the test suite to be stopped ↵Antoine Pitrou2014-11-231-0/+28
|\ \ | |/ | | | | 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-231-0/+28
| | | | | | | | when in failfast mode, even in the absence of failures.
* | Close #22457: Honour load_tests in the start_dir of discovery.Robert Collins2014-11-042-1/+46
| | | | | | | | | | | | 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-291-101/+150
| | | | | | | | | | | | | | 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-202-0/+28
| | | | | | | | | | | | 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-161-0/+10
| |
* | A few tweaks for issue16662 based on feedback from Robert Collins.Barry Warsaw2014-09-081-36/+41
| |
* | - Issue #16662: load_tests() is now unconditionally run when it is present inBarry Warsaw2014-09-082-17/+390
| | | | | | | | | | | | | | 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-221-3/+4
| | | | | | | | 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-091-0/+6
| | | | | | | | | | 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-281-0/+31
|\ \ | |/ | | | | in the exception's traceback.
| * Issue #9815: assertRaises now tries to clear references to local variables ↵Antoine Pitrou2014-04-281-0/+31
| | | | | | | | 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
| |
* | Closes Issue 21262: New method assert_not_called for Mock.Kushal Das2014-04-161-0/+9
| | | | | | | | It raises AssertionError if the mock has been called.
* | Closes Issue 21238: New keyword argument `unsafe` to Mock.Kushal Das2014-04-161-0/+11
| | | | | | | | | | It raises `AttributeError` incase of an attribute startswith assert or assret.
* | MergeMichael Foord2014-04-151-1/+18
|\ \ | |/
| * Closes issue 21239. unittest.mock.patch.stopall() did not work ↵Michael Foord2014-04-151-1/+18
| | | | | | | | deterministically when the same name was patched multiple times.
* | MergeKushal Das2014-04-151-0/+4
|\ \ | |/
| * Closes Issue 21222.Kushal Das2014-04-151-0/+4
| | | | | | | | 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-141-2/+22
|/ | | | patching builtin names.
* Issue 17826. Setting an iterable side_effect on a mock created by ↵Michael Foord2014-04-141-0/+18
| | | | create_autospec now works
* Issue 20968. unittest.mock.MagicMock now supports divisionMichael Foord2014-04-141-0/+25
|
* backport: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.R David Murray2014-03-251-0/+12
| | | | | | | 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.
* Fixes Issue #20165: The unittest module no longer considers tests marked withGregory P. Smith2014-01-201-2/+2
| | | | @expectedFailure successful if they pass.
* Fix breakage in TestSuite.countTestCases() introduced by issue #11798.Antoine Pitrou2013-12-281-0/+31
|