summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-32593: Drop FreeBSD 9 and older support (#5232)Victor Stinner2018-01-221-8/+0
| | | Drop support of FreeBSD 9 and older.
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-1/+1
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* bpo-32230: Set sys.warnoptions with -X dev (#4820)Victor Stinner2017-12-121-1/+1
| | | | | | | | | | | | | | Rather than supporting dev mode directly in the warnings module, this instead adjusts the initialisation code to add an extra 'default' entry to sys.warnoptions when dev mode is enabled. This ensures that dev mode behaves *exactly* as if `-Wdefault` had been passed on the command line, including in the way it interacts with `sys.warnoptions`, and with other command line flags like `-bb`. Fix also bpo-20361: have -b & -bb options take precedence over any other warnings options. Patch written by Nick Coghlan, with minor modifications of Victor Stinner.
* bpo-32071: Fix regression and add What's New entry (#4589)Jonas Haag2017-11-281-0/+23
| | | | | | * bpo-32071: Fix an undocumented behaviour regression * bpo-32071: Add 3.7 release note entry for unittest -k
* bpo-32071: Add unittest -k option (#4496)Jonas Haag2017-11-252-0/+55
| | | | * bpo-32071: Add unittest -k option
* Fix miscellaneous typos (#4275)luzpaz2017-11-051-1/+1
|
* bpo-30541: Add new method to seal mocks (GH61923)Mario Corchero2017-10-171-0/+181
| | | | | | | The new method allows the developer to control when to stop the feature of mocks that automagically creates new mocks when accessing an attribute that was not declared before Signed-off-by: Mario Corchero <mariocj89@gmail.com>
* Spelling fixes (#2902)Ville Skyttä2017-08-031-1/+1
|
* bpo-29403: Fix mock's broken autospec behavior on method-bound builtin ↵Aaron Gallagher2017-07-201-0/+15
| | | | | | | | | | | | | | | | | | | functions (GH-3) Cython will, in the right circumstances, offer a MethodType instance where im_func is a builtin function. Any instance of MethodType is automatically assumed to be a Python-defined function (more specifically, a function that has an inspectable signature), but _set_signature was still conservative in its assumptions. As a result _set_signature would return early with None instead of a mock since the im_func had no inspectable signature. This causes problems deeper inside mock, as _set_signature is assumed to _always_ return a mock, and nothing checked its return value. In similar corner cases, autospec will simply not check the spec of the function, so _set_signature is amended to now return early with the original, not-wrapped mock object. Patch by Aaron Gallagher.
* bpo-30813: Fix unittest when hunting refleaks (#2502)Victor Stinner2017-06-301-0/+6
| | | | | | bpo-11798, bpo-16662, bpo-16935, bpo-30813: Skip test_discover_with_module_that_raises_SkipTest_on_import() and test_discover_with_init_module_that_raises_SkipTest_on_import() of test_unittest when hunting reference leaks using regrtest.
* bpo-30664: The description of a unittest subtest now preserves the (#2265)Serhiy Storchaka2017-06-231-5/+14
| | | | order of keyword arguments of TestCase.subTest().
* #30190: fix invalid escape sequence warnings (#1534)Giampaolo Rodola2017-05-101-3/+3
|
* bpo-30190: improved error msg for assertAlmostEqual(delta=...) (#1331)Giampaolo Rodola2017-05-011-3/+5
| | | | | | | | | | | | * #30190 / unittest / assertAlmostEqual(delta=...) / error msg: show the difference between the 2 numbers in case of failure * safe_repr() diff * also show difference when passing 'places' argument * refactoring * update Misc/NEWS
* bpo-30022: Get rid of using EnvironmentError and IOError (except test… (#1051)Serhiy Storchaka2017-04-161-2/+2
|
* Fix ref cycles in TestCase.assertRaises() (#193)Victor Stinner2017-03-271-0/+13
| | | | bpo-23890: unittest.TestCase.assertRaises() now manually breaks a reference cycle to not keep objects alive longer than expected.
* bpo-28961: Address my comments from earlier code review (#305)Berker Peksag2017-02-261-12/+3
|
* Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-211-3/+14
|\
| * Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-211-3/+14
| |\
| | * Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY.Serhiy Storchaka2017-01-211-3/+14
| | |
* | | Issue 29274: Merge doc fixes from 3.6Martin Panter2017-01-181-4/+4
|\ \ \ | |/ /
| * | Issue 29274: Merge doc fixes from 3.5Martin Panter2017-01-181-4/+4
| |\ \ | | |/
| | * Issue #29274: tests cases → test casesMartin Panter2017-01-181-4/+4
| | |
* | | Issue #20804: The unittest.mock.sentinel attributes now preserve theirSerhiy Storchaka2017-01-111-0/+13
|/ / | | | | | | identity when they are copied or pickled.
* | Fix unittest.mock._Call: don't ignore nameVictor Stinner2017-01-061-0/+14
| | | | | | | | | | | | | | Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter anymore. Patch written by Jiajun Huang.
* | Fixes issue28380: unittest.mock Mock autospec functions now properly supportGregory P. Smith2016-10-061-0/+6
| | | | | | | | assert_called, assert_not_called, and assert_called_once.
* | Issue #25651: Merge from 3.5Berker Peksag2016-09-211-0/+10
|\ \ | |/
| * Issue #25651: Allow falsy values to be used for msg parameter of subTest()Berker Peksag2016-09-211-0/+10
| |
| * Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter2016-09-072-2/+2
| |
* | #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-082-13/+13
| | | | | | | | | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* | Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-302-2/+2
| |
* | MergeRaymond Hettinger2016-08-261-1/+1
|\ \ | |/
| * Issue 19504: Change "customise" to "customize" American spelling.Raymond Hettinger2016-08-261-1/+1
| |
* | Issue #26750: unittest.mock.create_autospec() now works properly forGregory P. Smith2016-08-071-21/+39
|\ \ | |/ | | | | | | subclasses of property() and other data descriptors. Removes the never publicly used, never documented unittest.mock.DescriptorTypes tuple.
| * Issue #26750: unittest.mock.create_autospec() now works properlyGregory P. Smith2016-08-071-21/+39
| | | | | | | | for subclasses of property() and other data descriptors.
* | Issue #27430: Merge from 3.5Berker Peksag2016-07-011-1/+1
|\ \ | |/
| * Issue #27430: Fix typos, patch by scop.Berker Peksag2016-07-011-1/+1
| |
* | Issue #21271: Adds new keyword only parameters in reset_mock callKushal Das2016-06-021-0/+18
| | | | | | | | | | We now have two keyword only parameters in the reset_mock function to selectively reset the return_value or the side_effects, or both.
* | Issue #27063: Some unittest loader tests were silently skipped.Serhiy Storchaka2016-05-201-26/+28
|\ \ | |/
| * Issue #27063: Some unittest loader tests were silently skipped.Serhiy Storchaka2016-05-201-26/+28
| |
* | Issue #26807: mock_open 'files' no longer error on readline at end of file.Robert Collins2016-05-161-0/+12
|\ \ | |/ | | | | Patch from Yolanda Robla.
| * Issue #26807: mock_open 'files' no longer error on readline at end of file.Robert Collins2016-05-161-0/+12
| | | | | | | | Patch from Yolanda Robla.
* | Merge 3.5Serhiy Storchaka2016-04-251-0/+76
|\ \ | |/
| * Issue #26837: assertSequenceEqual() now correctly outputs non-stringifiedSerhiy Storchaka2016-04-251-0/+76
| | | | | | | | | | differing items (like bytes in the -b mode). This affects assertListEqual() and assertTupleEqual().
* | Issue #23277: Remove unused imports in tests.Serhiy Storchaka2016-04-242-3/+2
| |
* | Issue #23277: Remove unused sys and os importsBerker Peksag2016-04-241-2/+0
| | | | | | | | Patch by Jon Dufresne.
* | Merge 3.5 (test_unittest)Victor Stinner2016-03-291-3/+6
|\ \ | |/
| * Fix ResourceWarning in test_unittest when interruptedVictor Stinner2016-03-291-3/+6
| |
* | Issue #25195: Fix a regression in mock.MagicMockBerker Peksag2016-03-271-0/+17
|\ \ | |/ | | | | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer.
| * Issue #25195: Fix a regression in mock.MagicMockBerker Peksag2016-03-271-0/+17
| | | | | | | | | | | | | | _Call is a subclass of tuple (changeset 3603bae63c13 only works for classes) so we need to implement __ne__ ourselves. Patch by Andrew Plummer.
* | #25320: Handle sockets in directories unittest discovery is scanning.Robert Collins2016-03-151-0/+40
|\ \ | |/ | | | | Patch from Victor van den Elzen.