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
dfcd6946
Commit
dfcd6946
authored
Nov 11, 2013
by
Zachary Ware
Browse files
Options
Browse Files
Download
Plain Diff
Issue #19440: Clean up test_capi
parents
8f56bf57
c12f09ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
Lib/test/test_capi.py
Lib/test/test_capi.py
+8
-14
Misc/NEWS
Misc/NEWS
+4
-0
No files found.
Lib/test/test_capi.py
View file @
dfcd6946
# Run the _testcapi module tests (tests for the Python/C API): by defn,
# these are all functions _testcapi exports whose name begins with 'test_'.
from
__future__
import
with_statement
import
os
import
pickle
import
random
...
...
@@ -416,18 +415,13 @@ class TestThreadState(unittest.TestCase):
t
.
start
()
t
.
join
()
def
test_main
():
support
.
run_unittest
(
CAPITest
,
TestPendingCalls
,
Test6012
,
EmbeddingTests
,
SkipitemTest
,
TestThreadState
,
SubinterpreterTest
)
for
name
in
dir
(
_testcapi
):
if
name
.
startswith
(
'test_'
):
test
=
getattr
(
_testcapi
,
name
)
if
support
.
verbose
:
print
(
"internal"
,
name
)
test
()
class
Test_testcapi
(
unittest
.
TestCase
):
def
test__testcapi
(
self
):
for
name
in
dir
(
_testcapi
):
if
name
.
startswith
(
'test_'
):
with
self
.
subTest
(
"internal"
,
name
=
name
):
test
=
getattr
(
_testcapi
,
name
)
test
()
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Misc/NEWS
View file @
dfcd6946
...
...
@@ -213,6 +213,10 @@ Library
Tests
-----
- Issue #19440: Clean up test_capi by removing an unnecessary __future__
import, converting from test_main to unittest.main, and running the
_testcapi module tests as subTests of a unittest TestCase method.
- Issue #19378: the main dis module tests are now run with both stdout
redirection *and* passing an explicit file parameter
...
...
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