Skip to content

Commit

Permalink
Merge e7a8abd into 8223435
Browse files Browse the repository at this point in the history
  • Loading branch information
vxgmichel committed May 10, 2019
2 parents 8223435 + e7a8abd commit cc5e454
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions aioconsole/stream.py
Expand Up @@ -166,9 +166,12 @@ def create_standard_streams(stdin, stdout, stderr, *, loop=None):

@asyncio.coroutine
def get_standard_streams(*, cache={}, use_stderr=False, loop=None):
key = sys.stdin, sys.stdout, sys.stderr
if loop is None:
loop = asyncio.get_event_loop()
args = sys.stdin, sys.stdout, sys.stderr
key = args, loop
if cache.get(key) is None:
connection = create_standard_streams(*key, loop=loop)
connection = create_standard_streams(*args, loop=loop)
cache[key] = yield from connection
in_reader, out_writer, err_writer = cache[key]
return in_reader, err_writer if use_stderr else out_writer
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
@@ -1,5 +1,5 @@
[tool:pytest]
addopts = tests --strict --cov aioconsole
addopts = tests --strict --cov aioconsole --count 2

[aliases]
test = pytest
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -27,7 +27,8 @@
'pytest-asyncio>=0.8;python_version>"3.4"',
'pytest<4;python_version=="3.4"',
'pytest-asyncio<0.6;python_version=="3.4"',
'pytest-cov'],
'pytest-cov',
'pytest-repeat'],

license="GPLv3",
classifiers=CLASSIFIERS,
Expand Down

0 comments on commit cc5e454

Please sign in to comment.