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
47236db1
Commit
47236db1
authored
Jan 10, 2013
by
Ezio Melotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#16896: test_asyncore now works with unittest test discovery. Patch by Zachary Ware.
parent
f472a90d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
16 deletions
+11
-16
Lib/test/test_asyncore.py
Lib/test/test_asyncore.py
+8
-16
Misc/NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_asyncore.py
View file @
47236db1
...
...
@@ -513,7 +513,7 @@ class BaseClient(BaseTestHandler):
pass
class
BaseTestAPI
(
unittest
.
TestCase
)
:
class
BaseTestAPI
:
def
tearDown
(
self
):
asyncore
.
close_all
()
...
...
@@ -821,34 +821,26 @@ class TestAPI_UseUnixSockets(BaseTestAPI):
unlink
(
self
.
addr
)
BaseTestAPI
.
tearDown
(
self
)
class
TestAPI_UseIPv4Select
(
TestAPI_UseIPv4Sockets
):
class
TestAPI_UseIPv4Select
(
TestAPI_UseIPv4Sockets
,
unittest
.
TestCase
):
use_poll
=
False
@
unittest
.
skipUnless
(
hasattr
(
select
,
'poll'
),
'select.poll required'
)
class
TestAPI_UseIPv4Poll
(
TestAPI_UseIPv4Sockets
):
class
TestAPI_UseIPv4Poll
(
TestAPI_UseIPv4Sockets
,
unittest
.
TestCase
):
use_poll
=
True
class
TestAPI_UseIPv6Select
(
TestAPI_UseIPv6Sockets
):
class
TestAPI_UseIPv6Select
(
TestAPI_UseIPv6Sockets
,
unittest
.
TestCase
):
use_poll
=
False
@
unittest
.
skipUnless
(
hasattr
(
select
,
'poll'
),
'select.poll required'
)
class
TestAPI_UseIPv6Poll
(
TestAPI_UseIPv6Sockets
):
class
TestAPI_UseIPv6Poll
(
TestAPI_UseIPv6Sockets
,
unittest
.
TestCase
):
use_poll
=
True
class
TestAPI_UseUnixSocketsSelect
(
TestAPI_UseUnixSockets
):
class
TestAPI_UseUnixSocketsSelect
(
TestAPI_UseUnixSockets
,
unittest
.
TestCase
):
use_poll
=
False
@
unittest
.
skipUnless
(
hasattr
(
select
,
'poll'
),
'select.poll required'
)
class
TestAPI_UseUnixSocketsPoll
(
TestAPI_UseUnixSockets
):
class
TestAPI_UseUnixSocketsPoll
(
TestAPI_UseUnixSockets
,
unittest
.
TestCase
):
use_poll
=
True
def
test_main
():
tests
=
[
HelperFunctionTests
,
DispatcherTests
,
DispatcherWithSendTests
,
DispatcherWithSendTests_UsePoll
,
FileWrapperTest
,
TestAPI_UseIPv4Select
,
TestAPI_UseIPv4Poll
,
TestAPI_UseIPv6Select
,
TestAPI_UseIPv6Poll
,
TestAPI_UseUnixSocketsSelect
,
TestAPI_UseUnixSocketsPoll
]
run_unittest
(
*
tests
)
if
__name__
==
"__main__"
:
test_
main
()
unittest
.
main
()
Misc/NEWS
View file @
47236db1
...
...
@@ -408,6 +408,9 @@ Library
Tests
-----
- Issue #16896: test_asyncore now works with unittest test discovery.
Patch by Zachary Ware.
- Issue #16897: test_bisect now works with unittest test discovery.
Initial patch by Zachary Ware.
...
...
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