| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit da2bf9f66d0c95b988c5d87646d168f65499b316)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
|
|
|
|
|
|
| |
(cherry picked from commit 2087023fdec2c89070bd14f384a3c308c548a94a)
Co-authored-by: Tony Flury <anthony.flury@btinternet.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only make sure that the result is in unittest.signals._results, don't
check the full content of unittest.signals._results.
support._run_suite() uses TextTestRunner in verbose mode, but
TextTestRunner.run() calls registerResult(result) which made the test
fail with "odd object in result set".
Call also removeResult() to restore unittest.signals._results to
avoid test side effect.
(cherry picked from commit fd8fbce495c32b0cbc13f71a8e9d4eec6f48c844)
Co-authored-by: Victor Stinner <vstinner@redhat.com>
|
|
|
|
|
| |
(cherry picked from commit 4ab4695388fb9ec03a14d93e90ce50d832a920ec)
Co-authored-by: Tal Einat <taleinat+github@gmail.com>
|
|
|
|
|
|
| |
Fix typos found by codespell in docs, docstrings, and comments.
(cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)
Co-authored-by: Leo Arias <leo.arias@canonical.com>
|
|
|
| |
Drop support of FreeBSD 9 and older.
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 an undocumented behaviour regression
* bpo-32071: Add 3.7 release note entry for unittest -k
|
|
|
|
| |
* bpo-32071: Add unittest -k option
|
| |
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-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.
|
|
|
|
| |
order of keyword arguments of TestCase.subTest().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* #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-23890: unittest.TestCase.assertRaises() now manually breaks a
reference cycle to not keep objects alive longer than expected.
|
| |
|
|\ |
|
| |\ |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
|/ /
| |
| |
| | |
identity when they are copied or pickled.
|
| |
| |
| |
| |
| |
| |
| | |
Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.
Patch written by Jiajun Huang.
|
| |
| |
| |
| | |
assert_called, assert_not_called, and assert_called_once.
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
|
| | |
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| |
| | |
subclasses of property() and other data descriptors. Removes the never
publicly used, never documented unittest.mock.DescriptorTypes tuple.
|
| |
| |
| |
| | |
for subclasses of property() and other data descriptors.
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| |
| | |
We now have two keyword only parameters in the reset_mock function to
selectively reset the return_value or the side_effects, or both.
|
|\ \
| |/ |
|
| | |
|
|\ \
| |/
| |
| | |
Patch from Yolanda Robla.
|
| |
| |
| |
| | |
Patch from Yolanda Robla.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
differing items (like bytes in the -b mode). This affects assertListEqual()
and assertTupleEqual().
|
| | |
|
| |
| |
| |
| | |
Patch by Jon Dufresne.
|