Ville Skyttä
49b2734bf1
Spelling fixes ( #2902 )
2017-08-03 09:00:59 +03:00
Aaron Gallagher
856cbcc12f
bpo-29403: Fix mock's broken autospec behavior on method-bound builtin 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.
2017-07-20 03:01:14 +03:00
Victor Stinner
e4f9a2d2be
bpo-30813: Fix unittest when hunting refleaks ( #2502 )
...
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.
2017-06-30 12:52:52 +02:00
Serhiy Storchaka
48fbe52ac7
bpo-30664: The description of a unittest subtest now preserves the ( #2265 )
...
order of keyword arguments of TestCase.subTest().
2017-06-23 21:47:39 +03:00
Giampaolo Rodola
c4750959ac
#30190 : fix invalid escape sequence warnings ( #1534 )
2017-05-10 20:13:20 +02:00
Giampaolo Rodola
5d7a8d0c13
bpo-30190: improved error msg for assertAlmostEqual(delta=...) ( #1331 )
...
* #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
2017-05-01 18:18:56 +02:00
Serhiy Storchaka
55fe1ae970
bpo-30022: Get rid of using EnvironmentError and IOError (except test… ( #1051 )
2017-04-16 10:46:38 +03:00
Victor Stinner
bbd3cf8f1e
Fix ref cycles in TestCase.assertRaises() ( #193 )
...
bpo-23890: unittest.TestCase.assertRaises() now manually breaks a
reference cycle to not keep objects alive longer than expected.
2017-03-28 00:56:28 +02:00
Berker Peksag
5aa3856b4f
bpo-28961: Address my comments from earlier code review ( #305 )
2017-02-26 15:04:11 +03:00
Serhiy Storchaka
19dea2c726
Issue #28735 : Fixed the comparison of mock.MagickMock with mock.ANY.
2017-01-21 23:17:25 +02:00
Serhiy Storchaka
a203360836
Issue #28735 : Fixed the comparison of mock.MagickMock with mock.ANY.
2017-01-21 23:15:18 +02:00
Serhiy Storchaka
362f058a89
Issue #28735 : Fixed the comparison of mock.MagickMock with mock.ANY.
2017-01-21 23:12:58 +02:00
Martin Panter
9722d7f142
Issue 29274: Merge doc fixes from 3.6
2017-01-18 12:11:42 +00:00
Martin Panter
4710935b11
Issue 29274: Merge doc fixes from 3.5
2017-01-18 12:11:12 +00:00
Martin Panter
37f183d43d
Issue #29274 : tests cases → test cases
2017-01-18 12:06:38 +00:00
Serhiy Storchaka
d9c956fb23
Issue #20804 : The unittest.mock.sentinel attributes now preserve their
...
identity when they are copied or pickled.
2017-01-11 20:13:03 +02:00
Victor Stinner
84b6fb0eea
Fix unittest.mock._Call: don't ignore name
...
Issue #28961 : Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.
Patch written by Jiajun Huang.
2017-01-06 18:15:51 +01:00
Gregory P. Smith
ac5084b6c7
Fixes issue28380: unittest.mock Mock autospec functions now properly support
...
assert_called, assert_not_called, and assert_called_once.
2016-10-06 14:31:23 -07:00
Berker Peksag
b3d4e7fe71
Issue #25651 : Merge from 3.5
2016-09-21 19:35:28 +03:00
Berker Peksag
16ea19fc66
Issue #25651 : Allow falsy values to be used for msg parameter of subTest()
2016-09-21 19:34:15 +03:00
Martin Panter
0be894b2f6
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-09-07 12:03:06 +00:00
R David Murray
44b548dda8
#27364 : fix "incorrect" uses of escape character in the stdlib.
...
And most of the tools.
Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and
Martin Panter.
2016-09-08 13:59:53 -04:00
Raymond Hettinger
15f44ab043
Issue #27895 : Spelling fixes (Contributed by Ville Skyttä).
2016-08-30 10:47:49 -07:00
Raymond Hettinger
f74c33ad5c
Merge
2016-08-25 21:12:16 -07:00
Raymond Hettinger
7ea386e56e
Issue 19504: Change "customise" to "customize" American spelling.
2016-08-25 21:11:50 -07:00
Gregory P. Smith
d0d24fd1ae
Issue #26750 : unittest.mock.create_autospec() now works properly for
...
subclasses of property() and other data descriptors. Removes the never
publicly used, never documented unittest.mock.DescriptorTypes tuple.
2016-08-07 09:06:27 -07:00
Gregory P. Smith
9854789efe
Issue #26750 : unittest.mock.create_autospec() now works properly
...
for subclasses of property() and other data descriptors.
2016-08-07 08:52:26 -07:00
Berker Peksag
a9e1ebb780
Issue #27430 : Merge from 3.5
2016-07-01 12:17:45 +03:00
Berker Peksag
e39682b076
Issue #27430 : Fix typos, patch by scop.
2016-07-01 12:17:05 +03:00
Kushal Das
9cd39a170b
Issue #21271 : Adds new keyword only parameters in reset_mock call
...
We now have two keyword only parameters in the reset_mock function to
selectively reset the return_value or the side_effects, or both.
2016-06-02 10:20:16 -07:00
Serhiy Storchaka
742206d95c
Issue #27063 : Some unittest loader tests were silently skipped.
2016-05-20 23:29:07 +03:00
Serhiy Storchaka
0dad755600
Issue #27063 : Some unittest loader tests were silently skipped.
2016-05-20 23:28:37 +03:00
Robert Collins
c85dd85f1a
Issue #26807 : mock_open 'files' no longer error on readline at end of file.
...
Patch from Yolanda Robla.
2016-05-16 15:22:45 +12:00
Robert Collins
9549a3e3d4
Issue #26807 : mock_open 'files' no longer error on readline at end of file.
...
Patch from Yolanda Robla.
2016-05-16 15:22:01 +12:00
Serhiy Storchaka
81e7f94076
Merge 3.5
2016-04-25 08:58:59 +03:00
Serhiy Storchaka
685fbed7f9
Issue #26837 : assertSequenceEqual() now correctly outputs non-stringified
...
differing items (like bytes in the -b mode). This affects assertListEqual()
and assertTupleEqual().
2016-04-25 08:58:25 +03:00
Serhiy Storchaka
e437a10d15
Issue #23277 : Remove unused imports in tests.
2016-04-24 21:41:02 +03:00
Berker Peksag
1e8ee9b380
Issue #23277 : Remove unused sys and os imports
...
Patch by Jon Dufresne.
2016-04-24 07:31:42 +03:00
Victor Stinner
6e722bc13f
Merge 3.5 (test_unittest)
2016-03-30 01:15:48 +02:00
Victor Stinner
9db2ae7263
Fix ResourceWarning in test_unittest when interrupted
2016-03-30 01:15:28 +02:00
Berker Peksag
5a6c018b57
Issue #25195 : Fix a regression in mock.MagicMock
...
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.
Patch by Andrew Plummer.
2016-03-28 00:30:40 +03:00
Berker Peksag
ce913877e4
Issue #25195 : Fix a regression in mock.MagicMock
...
_Call is a subclass of tuple (changeset 3603bae63c13 only works
for classes) so we need to implement __ne__ ourselves.
Patch by Andrew Plummer.
2016-03-28 00:30:02 +03:00
Robert Collins
bfef0be420
#25320 : Handle sockets in directories unittest discovery is scanning.
...
Patch from Victor van den Elzen.
2016-03-15 13:33:28 +13:00
Robert Collins
ecd5383891
#25320 : Handle sockets in directories unittest discovery is scanning.
...
Patch from Victor van den Elzen.
2016-03-15 13:29:17 +13:00
Victor Stinner
2c2a4e63d7
Add Mock.assert_called()
...
Issue #26323 : Add assert_called() and assert_called_once() methods to
unittest.mock.Mock.
2016-03-11 22:17:48 +01:00
Senthil Kumaran
81bc927da7
Issue #22138 : Fix mock.patch behavior when patching descriptors. Restore
...
original values after patching.
Patch contributed by Sean McCully.
2016-01-08 23:43:29 -08:00
Martin Panter
d2ad5718ad
Issue #25523 : Further a-to-an corrections new in 3.5
2015-11-02 04:20:33 +00:00
Berker Peksag
29bf4d403d
Issue #24857 : Comparing call_args to a long sequence now correctly returns a
...
boolean result instead of raising an exception.
Patch by A Kaptur.
2015-09-09 23:39:45 +03:00
Berker Peksag
3fc536f1c9
Issue #24857 : Comparing call_args to a long sequence now correctly returns a
...
boolean result instead of raising an exception.
Patch by A Kaptur.
2015-09-09 23:35:25 +03:00
Robert Collins
079fc7faff
Issue #21112 : Fix regression in unittest.expectedFailure on subclasses.
...
Patch from Berker Peksag.
2015-08-28 10:35:14 +12:00
Robert Collins
ed599b7c84
Issue #21112 : Fix regression in unittest.expectedFailure on subclasses.
...
Patch from Berker Peksag.
2015-08-28 10:34:51 +12:00
Robert Collins
be6caca534
Issue #20362 : Honour TestCase.longMessage correctly in assertRegex.
...
Patch from Ilia Kurenkov.
2015-08-20 11:13:09 +12:00
Berker Peksag
86b34da5ef
Issue #23004 : mock_open() now reads binary data correctly when the type of read_data is bytes.
...
Initial patch by Aaron Hill.
2015-08-06 13:15:51 +03:00
Robert Collins
ca647ef60a
Issue #21750 : Further fixup to be styled like other mock APIs.
2015-07-24 03:48:20 +12:00
Robert Collins
5329aaa74b
Issue #21750 : mock_open.read_data can now be read from each instance, as it
...
could in Python 3.3.
2015-07-17 20:08:45 +12:00
Robert Collins
b37f43f94b
- Issue #18622 : unittest.mock.mock_open().reset_mock would recurse infinitely.
...
Patch from Nicola Palumbo and Laurent De Buyst.
2015-07-15 11:42:28 +12:00
Berker Peksag
abfaecdfdd
Issue #23004 : mock_open() now reads binary data correctly when the type of read_data is bytes.
...
Initial patch by Aaron Hill.
2015-08-06 13:16:52 +03:00
Robert Collins
88ba360c88
Issue #21750 : Further fixup to be styled like other mock APIs.
2015-07-24 03:48:45 +12:00
Robert Collins
4838717b53
Issue #21750 : mock_open.read_data can now be read from each instance, as it
...
could in Python 3.3.
2015-07-17 20:10:23 +12:00
Robert Collins
76d508b5d4
- Issue #18622 : unittest.mock.mock_open().reset_mock would recurse infinitely.
...
Patch from Nicola Palumbo and Laurent De Buyst.
2015-07-15 11:49:43 +12:00
Robert Collins
f58f88c4c7
Issue #23661 : unittest.mock side_effects can now be exceptions again.
...
This was a regression vs Python 3.4. Patch from Ignacio Rossi
2015-07-14 13:51:40 +12:00
Serhiy Storchaka
041dd8eef1
Issue #15836 : assertRaises(), assertRaisesRegex(), assertWarns() and
...
assertWarnsRegex() assertments now check the type of the first argument
to prevent possible user error. Based on patch by Daniel Wagner-Hall.
2015-05-21 20:15:40 +03:00
Serhiy Storchaka
e98209c2b4
Issue #24245 : Eliminated senseless expect clauses that have no any effect.
...
Patch by Martin Panter.
2015-05-20 16:10:04 +03:00
Serhiy Storchaka
df573d6ad8
Issue #24134 : assertRaises(), assertRaisesRegex(), assertWarns() and
...
assertWarnsRegex() checks now emits a deprecation warning when callable is
None or keyword arguments except msg is passed in the context manager mode.
2015-05-16 16:29:50 +03:00
Serhiy Storchaka
24d3b7f9df
Issue #24134 : assertRaises(), assertRaisesRegex(), assertWarns() and
...
assertWarnsRegex() checks are not longer successful if the callable is None.
Added tests for assertRaises().
2015-05-06 19:14:47 +03:00
Serhiy Storchaka
e130503c7b
Issue #24134 : assertRaises(), assertRaisesRegex(), assertWarns() and
...
assertWarnsRegex() checks are not longer successful if the callable is None.
Added tests for assertRaises().
2015-05-06 19:13:11 +03:00
Łukasz Langa
a468db9b0b
Issue #23310 : Fix MagicMock's initializer to work with __methods__.
...
Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
2015-04-13 23:12:42 -07:00
Łukasz Langa
5f6684efe0
Issue #23310 : Fix MagicMock's initializer to work with __methods__.
...
Behavior equivalent to m.configure_mock(). Patch by Kasia Jachim.
2015-04-14 00:12:57 -07:00
Serhiy Storchaka
a7d00c207f
Reverted issue #24134 changes (except new tests).
2015-05-16 16:25:43 +03:00
Antoine Pitrou
8eef6a9ad0
Issue #22903 : The fake test case created by unittest.loader when it fails importing a test module is now picklable.
2015-03-19 00:01:37 +01:00
Antoine Pitrou
d833779cea
Issue #22903 : The fake test case created by unittest.loader when it fails importing a test module is now picklable.
2015-03-18 23:56:46 +01:00
Berker Peksag
7aaa85932c
Issue #23568 : Add rdivmod support to MagicMock() objects.
...
Patch by Håkan Lövdahl.
2015-03-15 01:57:38 +02:00
Berker Peksag
a785dece57
Issue #23568 : Add rdivmod support to MagicMock() objects.
...
Patch by Håkan Lövdahl.
2015-03-15 01:51:56 +02:00
Berker Peksag
9bd8af788d
Issue #23581 : Add matmul support to MagicMock.
...
Patch by Håkan Lövdahl.
2015-03-12 20:42:48 +02:00
Robert Collins
f0c819acd0
Issue #22936 : Allow showing local variables in unittest errors.
2015-03-06 13:46:35 +13:00
Antoine Pitrou
18f22989dd
Issue #22894 : TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.
2014-11-23 15:55:11 +01:00
Antoine Pitrou
b9079c81dd
Issue #22894 : TestCase.subTest() would cause the test suite to be stopped when in failfast mode, even in the absence of failures.
2014-11-23 15:56:41 +01:00
Robert Collins
bf2bda3c97
Close #22457 : Honour load_tests in the start_dir of discovery.
...
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.
2014-11-05 03:09:01 +13:00
Robert Collins
659dd625b4
Close #7559 : ImportError when loading a test now shown as ImportError.
...
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.
2014-10-30 08:27:27 +13:00
Robert Collins
c134584020
Close #22756 : Improve the test output for some assertEqual tests.
...
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.
2014-10-30 08:16:28 +13:00
Robert Collins
f920c2122b
Close #19746 : expose unittest discovery errors on TestLoader.errors
...
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.
2014-10-20 13:24:05 +13:00
Berker Peksag
1ed2e69a4a
Issue #22186 : Fix typos in Lib/.
...
Patch by Févry Thibault.
2014-10-19 18:07:05 +03:00
Berker Peksag
f23530f569
Issue #22186 : Fix typos in Lib/.
...
Patch by Févry Thibault.
2014-10-19 18:04:38 +03:00
Benjamin Peterson
e87b7eafe4
fix windows tests ( #16662 )
...
From Robert Collins.
2014-09-29 21:54:28 -04:00
Kushal Das
a37b958d65
Closes #21270 : We now override tuple methods in mock.call objects.
2014-09-16 18:33:37 +05:30
Barry Warsaw
bb1e3f1ebe
A few tweaks for issue16662 based on feedback from Robert Collins.
2014-09-08 17:29:02 -04:00
Barry Warsaw
d78742a260
- Issue #16662 : load_tests() is now unconditionally run when it is present in
...
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.
2014-09-08 14:21:37 -04:00
Ezio Melotti
869778e520
#22092 : merge with 3.4.
2014-08-07 03:28:26 +03:00
Ezio Melotti
1241c47aa2
#22092 : use absolute imports in unittest tests. Patch by Vajrasky Kok.
2014-08-07 03:20:22 +03:00
Serhiy Storchaka
521e5860a5
Issue #22032 : __qualname__ instead of __name__ is now always used to format
...
fully qualified class names of Python implemented classes.
2014-07-22 15:00:37 +03:00
R David Murray
130a566a13
Suppress a couple more DeprecationWarnings in the test suite.
2014-06-11 17:09:43 -04:00
Kushal Das
047f14c3c6
Closes #21256 : Printout of keyword args in deterministic order in mock calls.
...
Printout of keyword args should be in deterministic order in
a mock function call. This will help to write better doctests.
2014-06-09 13:45:56 +05:30
Antoine Pitrou
b1e58440f8
Issue #9815 : assertRaises now tries to clear references to local variables in the exception's traceback.
2014-04-29 01:25:07 +02:00
Antoine Pitrou
9681022f1e
Issue #9815 : assertRaises now tries to clear references to local variables in the exception's traceback.
2014-04-29 01:23:50 +02:00
Ethan Furman
7b9ff0e6da
Issue8297: module attribute lookup failures now include module name in error message.
2014-04-24 14:47:47 -07:00
Michael Foord
ebc1a30d55
Closes issue 21239. unittest.mock.patch.stopall() did not work deterministically when the same name was patched multiple times.
2014-04-15 17:21:08 -04:00
Kushal Das
484f8a875b
Closes Issue 21222.
...
Passing name keyword argument to mock.create_autospec now works.
2014-04-16 01:05:50 +05:30
Mark Dickinson
d12290654a
Fix typo in test method name.
2014-04-18 16:08:47 +01:00
Kushal Das
8af9db3e4f
Closes Issue 21262: New method assert_not_called for Mock.
...
It raises AssertionError if the mock has been called.
2014-04-17 01:36:14 +05:30
Kushal Das
8c14534df6
Closes Issue 21238: New keyword argument `unsafe` to Mock.
...
It raises `AttributeError` incase of an attribute startswith assert
or assret.
2014-04-16 23:32:21 +05:30
Michael Foord
15f2d1775e
Merge
2014-04-15 17:22:22 -04:00
Kushal Das
5d1f6c3b15
Merge
2014-04-16 01:22:52 +05:30
Michael Foord
fddcfa27fa
Closes issue 17660. You no longer need to explicitly pass create=True when patching builtin names.
2014-04-14 16:25:20 -04:00
Michael Foord
01bafdcccc
Issue 17826. Setting an iterable side_effect on a mock created by create_autospec now works
2014-04-14 16:09:42 -04:00
Michael Foord
d2623d7786
Issue 20968. unittest.mock.MagicMock now supports division
2014-04-14 11:23:48 -04:00
R David Murray
ef1c26798c
backport: #20145 : assert[Raises|Warns]Regex now raise TypeError on bad regex.
...
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.
2014-03-25 15:31:50 -04:00
Gregory P. Smith
5a6d4bf671
Fixes Issue #20165 : The unittest module no longer considers tests marked with
...
@expectedFailure successful if they pass.
2014-01-20 01:11:18 -08:00
Antoine Pitrou
b5c66f8645
Fix breakage in TestSuite.countTestCases() introduced by issue #11798 .
2013-12-28 20:37:58 +01:00
Serhiy Storchaka
184ec79bd3
Remove commented out debugging code (remnants of issue #18996 ).
2013-12-10 13:53:56 +02:00
Victor Stinner
031bd532c4
Close #19880 : Fix a reference leak in unittest.TestCase. Explicitly break
...
reference cycles between frames and the _Outcome instance.
2013-12-09 01:52:50 +01:00
Michael Foord
514afeb65c
Merge
2013-11-23 13:30:03 +00:00
Michael Foord
e28bb15054
Issue 17457: extend test discovery to support namespace packages
2013-11-23 13:29:23 +00:00
Serhiy Storchaka
bc39869095
Issue #19594 : Use specific asserts in unittest tests.
2013-11-17 00:14:35 +02:00
Serhiy Storchaka
5665bc5980
Issue #19594 : Use specific asserts in unittest tests.
2013-11-17 00:12:21 +02:00
Antoine Pitrou
6c6b3f770d
Issue #19352 : Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv).
2013-10-23 19:15:05 +02:00
Antoine Pitrou
d5d0bc35ad
Issue #19352 : Fix unittest discovery when a module can be reached through several paths (e.g. under Debian/Ubuntu with virtualenv).
2013-10-23 19:11:29 +02:00
Serhiy Storchaka
77622f55c2
Issue #18996 : TestCase.assertEqual() now more cleverly shorten differing
...
strings in error report.
2013-09-23 23:07:00 +03:00
Michael Foord
468ec34084
Remove shadowed test
2013-09-15 20:05:19 +12:00
Antoine Pitrou
0715b9fad3
Issue #18937 : Add an assertLogs() context manager to unittest.TestCase to ensure that a block of code emits a message using the logging module.
2013-09-14 19:45:47 +02:00
Antoine Pitrou
a19b1a664f
Adjust comment
2013-09-14 00:40:46 +02:00
Antoine Pitrou
4b3c58c8a0
Issue #19013 : add a __main__ to unittest.test.testmock to ease CLI invocation
2013-09-14 00:39:15 +02:00
Antoine Pitrou
e1ba8df182
Issue #19013 : add a __main__ to unittest.test to ease CLI invocation
2013-09-14 00:37:18 +02:00
Antoine Pitrou
356bdeb0a1
Issue #19013 : add unittest.main() epilogs to unittest.mock's own test modules
2013-09-13 23:54:01 +02:00
Antoine Pitrou
1d7c8c9a00
Issue #19013 : add unittest.main() epilogs to unittest's own test modules
2013-09-13 23:52:46 +02:00
Andrew Svetlov
8913a6c83d
Issue #11798 : fix tests for regrtest -R :
2013-09-01 07:58:41 +03:00
Serhiy Storchaka
de2800f8f1
Issue #17974 : Switch unittest from using getopt to using argparse.
2013-08-29 12:37:28 +03:00
Andrew Svetlov
eb97368451
Issue #11798 : TestSuite now drops references to own tests after execution.
2013-08-28 21:28:38 +03:00
Ezio Melotti
e0c69161bc
#18741 : merge with 3.3.
2013-08-17 16:13:22 +03:00
Ezio Melotti
b5bc353b88
#18741 : fix more typos. Patch by Févry Thibault.
2013-08-17 16:11:40 +03:00
Ezio Melotti
b2855ccd09
#18663 : merge with 3.3.
2013-08-11 13:05:37 +03:00
Ezio Melotti
d51914c6c1
#18663 : document that assertAlmostEqual also works when the values are equal and add tests.
2013-08-11 13:04:50 +03:00
Łukasz Langa
06d3abbff3
clean the environment from pre-existing PYTHONWARNINGS for test_warnings
2013-04-24 01:51:42 +02:00
Łukasz Langa
6ae466732c
clean the environment from pre-existing PYTHONWARNINGS for test_warnings
2013-04-24 01:49:52 +02:00
R David Murray
c601dc1639
Merge #14971 : Use class method name, not function.__name__, during unittest discovery.
2013-04-11 08:58:11 -04:00
R David Murray
5e2f593145
#14971 : Use class method name, not function.__name__, during unittest discovery.
2013-04-11 08:55:45 -04:00
Andrew Svetlov
8ab1e513c1
Process DEFAULT values in mock side_effect that returns iterator.
...
Patch by Michael Ford.
2013-04-07 16:44:07 +03:00
Andrew Svetlov
8b2cd75bdd
Process DEFAULT values in mock side_effect that returns iterator.
...
Patch by Michael Ford.
2013-04-07 16:42:24 +03:00
Antoine Pitrou
22e162f462
Fix bug in TestResult.addSubTest()
2013-03-29 17:55:24 +01:00
Ezio Melotti
cf936c7287
#17510 : avoid using deprecated assertEquals method in test_program. Patch by Daniel Black.
2013-03-23 16:46:23 +02:00
Antoine Pitrou
c9b3ef2df0
Issue #16997 : unittest.TestCase now provides a subTest() context manager to procedurally generate, in an easy way, small test instances.
2013-03-20 20:16:47 +01:00
Michael Foord
04cbe0c35b
Closes issue 17467. Add readline and readlines support to unittest.mock.mock_open
2013-03-19 17:22:51 -07:00
Michael Foord
80cbc9e998
Closes issue 16709. unittest test discovery sorts test files for consistent test ordering
2013-03-18 17:50:12 -07:00
Ezio Melotti
eae2b38948
#16935 : unittest now counts the module as skipped if it raises SkipTest, instead of counting it as an error. Patch by Zachary Ware.
2013-03-01 14:47:50 +02:00
Petri Lehtinen
20054477f4
Issue #15132 : Allow a list for the defaultTest argument of unittest.TestProgram
...
Patch by Jyrki Pulliainen
2013-02-23 18:55:49 +01:00
Michael Foord
890d72d3c9
Merge. Closes issue 17052.
2013-02-11 13:33:00 +00:00
Michael Foord
b71b8ec7b1
Merge
2013-02-11 13:29:58 +00:00
Michael Foord
f78f5b11f6
Correction to issue 17052 fix
2013-02-11 13:20:52 +00:00
Michael Foord
4e08f786f0
Merge. Closes issue 17052.
2013-02-11 00:28:02 +00:00
Michael Foord
a23a39c07d
Merge
2013-02-11 00:18:07 +00:00
Michael Foord
8fd396bd22
Issue 17502: unittest discovery should use self.testLoader
2013-02-11 00:04:24 +00:00