Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f5e37037
Kaydet (Commit)
f5e37037
authored
Şub 26, 2014
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
asyncio: Fix pyflakes warnings: remove unused variables and imports
üst
24ba2035
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
26 deletions
+12
-26
test_utils.py
Lib/asyncio/test_utils.py
+0
-1
test_base_events.py
Lib/test/test_asyncio/test_base_events.py
+1
-1
test_events.py
Lib/test/test_asyncio/test_events.py
+1
-3
test_selector_events.py
Lib/test/test_asyncio/test_selector_events.py
+1
-2
test_streams.py
Lib/test/test_asyncio/test_streams.py
+0
-1
test_tasks.py
Lib/test/test_asyncio/test_tasks.py
+2
-6
test_unix_events.py
Lib/test/test_asyncio/test_unix_events.py
+6
-10
test_windows_events.py
Lib/test/test_asyncio/test_windows_events.py
+1
-2
No files found.
Lib/asyncio/test_utils.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -11,7 +11,6 @@ import sys
import
tempfile
import
threading
import
time
import
unittest
from
unittest
import
mock
from
http.server
import
HTTPServer
...
...
Lib/test/test_asyncio/test_base_events.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -7,7 +7,7 @@ import sys
import
time
import
unittest
from
unittest
import
mock
from
test.support
import
find_unused_port
,
IPV6_ENABLED
from
test.support
import
IPV6_ENABLED
import
asyncio
from
asyncio
import
base_events
...
...
Lib/test/test_asyncio/test_events.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -25,7 +25,6 @@ from test import support # find_unused_port, IPV6_ENABLED, TEST_HOME_DIR
import
asyncio
from
asyncio
import
events
from
asyncio
import
selector_events
from
asyncio
import
test_utils
...
...
@@ -1648,13 +1647,12 @@ class SubprocessTestsMixin:
def
test_subprocess_wait_no_same_group
(
self
):
proto
=
None
transp
=
None
@asyncio.coroutine
def
connect
():
nonlocal
proto
# start the new process in a new session
transp
,
proto
=
yield
from
self
.
loop
.
subprocess_shell
(
_
,
proto
=
yield
from
self
.
loop
.
subprocess_shell
(
functools
.
partial
(
MySubprocessProtocol
,
self
.
loop
),
'exit 7'
,
stdin
=
None
,
stdout
=
None
,
stderr
=
None
,
start_new_session
=
True
)
...
...
Lib/test/test_asyncio/test_selector_events.py
Dosyayı görüntüle @
f5e37037
"""Tests for selector_events.py"""
import
collections
import
errno
import
gc
import
pprint
...
...
@@ -1378,7 +1377,7 @@ class SelectorSslWithoutSslTransportTests(unittest.TestCase):
def
test_ssl_transport_requires_ssl_module
(
self
):
Mock
=
mock
.
Mock
with
self
.
assertRaises
(
RuntimeError
):
transport
=
_SelectorSslTransport
(
Mock
(),
Mock
(),
Mock
(),
Mock
())
_SelectorSslTransport
(
Mock
(),
Mock
(),
Mock
(),
Mock
())
class
SelectorDatagramTransportTests
(
unittest
.
TestCase
):
...
...
Lib/test/test_asyncio/test_streams.py
Dosyayı görüntüle @
f5e37037
"""Tests for streams.py."""
import
functools
import
gc
import
socket
import
unittest
...
...
Lib/test/test_asyncio/test_tasks.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -830,7 +830,7 @@ class TaskTests(unittest.TestCase):
v
=
yield
from
f
self
.
assertEqual
(
v
,
'a'
)
res
=
loop
.
run_until_complete
(
asyncio
.
Task
(
foo
(),
loop
=
loop
))
loop
.
run_until_complete
(
asyncio
.
Task
(
foo
(),
loop
=
loop
))
def
test_as_completed_reverse_wait
(
self
):
...
...
@@ -964,13 +964,9 @@ class TaskTests(unittest.TestCase):
loop
=
test_utils
.
TestLoop
(
gen
)
self
.
addCleanup
(
loop
.
close
)
sleepfut
=
None
@asyncio.coroutine
def
sleep
(
dt
):
nonlocal
sleepfut
sleepfut
=
asyncio
.
sleep
(
dt
,
loop
=
loop
)
yield
from
sleepfut
yield
from
asyncio
.
sleep
(
dt
,
loop
=
loop
)
@asyncio.coroutine
def
doit
():
...
...
Lib/test/test_asyncio/test_unix_events.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -1302,7 +1302,7 @@ class ChildWatcherTestsMixin:
m
.
waitpid
.
side_effect
=
ValueError
with
mock
.
patch
.
object
(
log
.
logger
,
'error'
)
as
m_error
:
'error'
)
as
m_error
:
self
.
assertEqual
(
self
.
watcher
.
_sig_chld
(),
None
)
self
.
assertTrue
(
m_error
.
called
)
...
...
@@ -1376,19 +1376,16 @@ class ChildWatcherTestsMixin:
# attach a new loop
old_loop
=
self
.
loop
self
.
loop
=
test_utils
.
TestLoop
()
patch
=
mock
.
patch
.
object
with
mock
.
patch
.
object
(
old_loop
,
"remove_signal_handler"
)
as
m_old_remove_signal_handler
,
\
mock
.
patch
.
object
(
self
.
loop
,
"add_signal_handler"
)
as
m_new_add_signal_handler
:
with
patch
(
old_loop
,
"remove_signal_handler"
)
as
m_old_remove
,
\
patch
(
self
.
loop
,
"add_signal_handler"
)
as
m_new_add
:
self
.
watcher
.
attach_loop
(
self
.
loop
)
m_old_remove
_signal_handler
.
assert_called_once_with
(
m_old_remove
.
assert_called_once_with
(
signal
.
SIGCHLD
)
m_new_add
_signal_handler
.
assert_called_once_with
(
m_new_add
.
assert_called_once_with
(
signal
.
SIGCHLD
,
self
.
watcher
.
_sig_chld
)
# child terminates
...
...
@@ -1462,7 +1459,6 @@ class ChildWatcherTestsMixin:
def
test_close
(
self
,
m
):
# register two children
callback1
=
mock
.
Mock
()
callback2
=
mock
.
Mock
()
with
self
.
watcher
:
self
.
running
=
True
...
...
Lib/test/test_asyncio/test_windows_events.py
Dosyayı görüntüle @
f5e37037
...
...
@@ -8,7 +8,6 @@ if sys.platform != 'win32':
import
_winapi
import
asyncio
from
asyncio
import
test_utils
from
asyncio
import
_overlapped
from
asyncio
import
windows_events
...
...
@@ -50,7 +49,7 @@ class ProactorTests(unittest.TestCase):
ADDRESS
=
r'\\.\pipe\test_double_bind-
%
s'
%
os
.
getpid
()
server1
=
windows_events
.
PipeServer
(
ADDRESS
)
with
self
.
assertRaises
(
PermissionError
):
server2
=
windows_events
.
PipeServer
(
ADDRESS
)
windows_events
.
PipeServer
(
ADDRESS
)
server1
.
close
()
def
test_pipe
(
self
):
...
...
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