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
cb1fe98f
Commit
cb1fe98f
authored
Oct 20, 2013
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make various asyncio test files individually runnable
parent
bcd76827
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
0 deletions
+32
-0
Lib/test/test_asyncio/test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+4
-0
Lib/test/test_asyncio/test_proactor_events.py
Lib/test/test_asyncio/test_proactor_events.py
+4
-0
Lib/test/test_asyncio/test_selector_events.py
Lib/test/test_asyncio/test_selector_events.py
+4
-0
Lib/test/test_asyncio/test_selectors.py
Lib/test/test_asyncio/test_selectors.py
+4
-0
Lib/test/test_asyncio/test_transports.py
Lib/test/test_asyncio/test_transports.py
+4
-0
Lib/test/test_asyncio/test_unix_events.py
Lib/test/test_asyncio/test_unix_events.py
+4
-0
Lib/test/test_asyncio/test_windows_events.py
Lib/test/test_asyncio/test_windows_events.py
+4
-0
Lib/test/test_asyncio/test_windows_utils.py
Lib/test/test_asyncio/test_windows_utils.py
+4
-0
No files found.
Lib/test/test_asyncio/test_base_events.py
View file @
cb1fe98f
...
@@ -588,3 +588,7 @@ class BaseEventLoopWithSelectorTests(unittest.TestCase):
...
@@ -588,3 +588,7 @@ class BaseEventLoopWithSelectorTests(unittest.TestCase):
self
.
loop
.
_accept_connection
(
MyProto
,
sock
)
self
.
loop
.
_accept_connection
(
MyProto
,
sock
)
self
.
assertTrue
(
sock
.
close
.
called
)
self
.
assertTrue
(
sock
.
close
.
called
)
self
.
assertTrue
(
m_log
.
exception
.
called
)
self
.
assertTrue
(
m_log
.
exception
.
called
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_proactor_events.py
View file @
cb1fe98f
...
@@ -478,3 +478,7 @@ class BaseProactorEventLoopTests(unittest.TestCase):
...
@@ -478,3 +478,7 @@ class BaseProactorEventLoopTests(unittest.TestCase):
self
.
loop
.
_stop_serving
(
sock
)
self
.
loop
.
_stop_serving
(
sock
)
self
.
assertTrue
(
sock
.
close
.
called
)
self
.
assertTrue
(
sock
.
close
.
called
)
self
.
proactor
.
_stop_serving
.
assert_called_with
(
sock
)
self
.
proactor
.
_stop_serving
.
assert_called_with
(
sock
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_selector_events.py
View file @
cb1fe98f
...
@@ -1483,3 +1483,7 @@ class SelectorDatagramTransportTests(unittest.TestCase):
...
@@ -1483,3 +1483,7 @@ class SelectorDatagramTransportTests(unittest.TestCase):
transport
.
_fatal_error
(
err
)
transport
.
_fatal_error
(
err
)
self
.
protocol
.
connection_refused
.
assert_called_with
(
err
)
self
.
protocol
.
connection_refused
.
assert_called_with
(
err
)
m_exc
.
assert_called_with
(
'Fatal error for %s'
,
transport
)
m_exc
.
assert_called_with
(
'Fatal error for %s'
,
transport
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_selectors.py
View file @
cb1fe98f
...
@@ -143,3 +143,7 @@ class BaseSelectorTests(unittest.TestCase):
...
@@ -143,3 +143,7 @@ class BaseSelectorTests(unittest.TestCase):
if
hasattr
(
selectors
.
DefaultSelector
,
'fileno'
):
if
hasattr
(
selectors
.
DefaultSelector
,
'fileno'
):
def
test_fileno
(
self
):
def
test_fileno
(
self
):
self
.
assertIsInstance
(
selectors
.
DefaultSelector
().
fileno
(),
int
)
self
.
assertIsInstance
(
selectors
.
DefaultSelector
().
fileno
(),
int
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_transports.py
View file @
cb1fe98f
...
@@ -53,3 +53,7 @@ class TransportTests(unittest.TestCase):
...
@@ -53,3 +53,7 @@ class TransportTests(unittest.TestCase):
self
.
assertRaises
(
NotImplementedError
,
transport
.
send_signal
,
1
)
self
.
assertRaises
(
NotImplementedError
,
transport
.
send_signal
,
1
)
self
.
assertRaises
(
NotImplementedError
,
transport
.
terminate
)
self
.
assertRaises
(
NotImplementedError
,
transport
.
terminate
)
self
.
assertRaises
(
NotImplementedError
,
transport
.
kill
)
self
.
assertRaises
(
NotImplementedError
,
transport
.
kill
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_unix_events.py
View file @
cb1fe98f
...
@@ -768,3 +768,7 @@ class UnixWritePipeTransportTests(unittest.TestCase):
...
@@ -768,3 +768,7 @@ class UnixWritePipeTransportTests(unittest.TestCase):
tr
.
write_eof
()
tr
.
write_eof
()
self
.
assertTrue
(
tr
.
_closing
)
self
.
assertTrue
(
tr
.
_closing
)
self
.
assertFalse
(
self
.
protocol
.
connection_lost
.
called
)
self
.
assertFalse
(
self
.
protocol
.
connection_lost
.
called
)
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_windows_events.py
View file @
cb1fe98f
...
@@ -93,3 +93,7 @@ class ProactorTests(unittest.TestCase):
...
@@ -93,3 +93,7 @@ class ProactorTests(unittest.TestCase):
protocols
.
Protocol
,
ADDRESS
)
protocols
.
Protocol
,
ADDRESS
)
return
'done'
return
'done'
if
__name__
==
'__main__'
:
unittest
.
main
()
Lib/test/test_asyncio/test_windows_utils.py
View file @
cb1fe98f
...
@@ -138,3 +138,7 @@ class PopenTests(unittest.TestCase):
...
@@ -138,3 +138,7 @@ class PopenTests(unittest.TestCase):
# allow for partial reads...
# allow for partial reads...
self
.
assertTrue
(
msg
.
upper
().
rstrip
().
startswith
(
out
))
self
.
assertTrue
(
msg
.
upper
().
rstrip
().
startswith
(
out
))
self
.
assertTrue
(
b"stderr"
.
startswith
(
err
))
self
.
assertTrue
(
b"stderr"
.
startswith
(
err
))
if
__name__
==
'__main__'
:
unittest
.
main
()
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