Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ef3da23c
Commit
ef3da23c
authored
Feb 23, 2014
by
R David Murray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whatsnew: unittest drops references to successful tests.
parent
9e2b14ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.4.rst
+18
-0
No files found.
Doc/whatsnew/3.4.rst
View file @
ef3da23c
...
...
@@ -1286,6 +1286,14 @@ error. (Contributed by Zach Ware in :issue:`16935`.)
consistent test ordering. (Contributed by Martin Melin and Jeff Ramnani in
:issue:`16709`.)
:class:`~unittest.TestSuite` now drops references to tests as soon as the test
has been run, if the test is successful. On Python interpreters that do
garbage collection, this allows the tests to be garbage collected if nothing
else is holding a reference to the test. It is possible to override this
behavior by creating a :class:`~unittest.TestSuite` subclass that defines a
custom ``_removeTestAtIndex`` method. (Contributed by Tom Wardill, Matt
McClure, and Andrew Svetlov in :issue:`11798`.)
venv
----
...
...
@@ -1871,6 +1879,16 @@ Changes in the Python API
Previously some builtin hashes had uppercase names, but now that it is a
formal public interface the naming has been made consistent (:issue:`18532`).
* Because :mod:`unittest.TestSuite` now drops references to tests after they
are run, test harnesses that re-use a :class:`~unittest.TestSuite` to re-run
a set of tests may fail. Test suites should not be re-used in this fashion
since it means state is retained between test runs, breaking the test
isolation that :mod:`unittest` is designed to provide. However, if the lack
of isolation is considered acceptable, the old behavior can be restored by
creating a :mod:`~unittest.TestSuite` subclass that defines a
``_removeTestAtIndex`` method that does nothing (see
:meth:`.TestSuite.__iter__`) (:issue:`11798`).
Changes in the C API
--------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment