[Pkg-bitcoin-commits] [python-quamash] 177/269: Timing tweeks to improve performance
Jonas Smedegaard
dr at jones.dk
Fri Nov 24 11:26:29 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository python-quamash.
commit 93115c4440301b589e3cb508912b2abf474ff486
Author: Mark Harviston <mark.harviston at gmail.com>
Date: Wed Jan 7 03:46:11 2015 -0800
Timing tweeks to improve performance
shorten some sleep events (or similar) to speed up tests (shave off a
whole second!)
found this while profiling.
---
tests/test_qeventloop.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tests/test_qeventloop.py b/tests/test_qeventloop.py
index 1846c8c..647ec8b 100644
--- a/tests/test_qeventloop.py
+++ b/tests/test_qeventloop.py
@@ -14,7 +14,6 @@ import quamash
import pytest
-
class _SubprocessProtocol(asyncio.SubprocessProtocol):
def __init__(self, *args, **kwds):
super(_SubprocessProtocol, self).__init__(*args, **kwds)
@@ -223,7 +222,7 @@ def test_can_function_as_context_manager(application):
def test_future_not_done_on_loop_shutdown(loop):
"""Verify RuntimError occurs when loop stopped before Future completed with run_until_complete."""
- loop.call_later(1, loop.stop)
+ loop.call_later(.1, loop.stop)
fut = asyncio.Future()
with pytest.raises(RuntimeError):
loop.run_until_complete(fut)
@@ -251,8 +250,8 @@ def test_call_at(loop):
was_invoked = True
was_invoked = False
- loop.call_at(loop.time() + .1, mycallback)
- loop.run_until_complete(asyncio.sleep(.5))
+ loop.call_at(loop.time() + .05, mycallback)
+ loop.run_until_complete(asyncio.sleep(.1))
assert was_invoked
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/python-quamash.git
More information about the Pkg-bitcoin-commits
mailing list