Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Commit a40fe76

Browse files
committed
Changed how we are importing the test_utils submodule as suggested
1 parent 5e4efd7 commit a40fe76

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

examples/cacheclt.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import logging
99

1010
import asyncio
11+
import asyncio.test_utils
1112

1213

1314
ARGS = argparse.ArgumentParser(description='Cache client example.')
@@ -173,7 +174,7 @@ def main():
173174
loop = asyncio.new_event_loop()
174175
sslctx = None
175176
if args.tls:
176-
sslctx = asyncio.test_utils.dummy_ssl_context()
177+
sslctx = test_utils.dummy_ssl_context()
177178
cache = CacheClient(args.host, args.port, sslctx=sslctx, loop=loop)
178179
try:
179180
loop.run_until_complete(

examples/source.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import sys
55

66
import asyncio
7+
import asyncio.test_utils
78

89

910
ARGS = argparse.ArgumentParser(description="TCP data sink example.")
@@ -72,7 +73,7 @@ def connection_lost(self, exc):
7273
def start(loop, host, port):
7374
sslctx = None
7475
if args.tls:
75-
sslctx = asyncio.test_utils.dummy_ssl_context()
76+
sslctx = test_utils.dummy_ssl_context()
7677
tr, pr = yield from loop.create_connection(Client, host, port,
7778
ssl=sslctx)
7879
dprint('tr =', tr)

examples/source1.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import sys
55

66
import asyncio
7+
import asyncio.test_utils
78

89

910
ARGS = argparse.ArgumentParser(description="TCP data sink example.")
@@ -56,7 +57,7 @@ def start(loop, args):
5657
sslctx = None
5758
if args.tls:
5859
d.print('using dummy SSLContext')
59-
sslctx = asyncio.test_utils.dummy_ssl_context()
60+
sslctx = test_utils.dummy_ssl_context()
6061
r, w = yield from asyncio.open_connection(args.host, args.port, ssl=sslctx)
6162
d.print('r =', r)
6263
d.print('w =', w)

examples/subprocess_attach_write_pipe.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import sys
66

77
import asyncio
8+
from asyncio.subprocess import PIPE
89

910
code = """
1011
import os, sys
@@ -23,7 +24,7 @@ def task():
2324
proc = yield from asyncio.create_subprocess_exec(
2425
*args,
2526
pass_fds={rfd},
26-
stdout=asyncio.subprocess.PIPE)
27+
stdout=PIPE)
2728

2829
pipe = open(wfd, 'wb', 0)
2930
transport, _ = yield from loop.connect_write_pipe(asyncio.Protocol,

0 commit comments

Comments
 (0)