diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2019-03-27 09:17:50 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2019-03-27 09:17:50 -0400 |
| commit | 5ddee992174b183ebe33d1f74b37c1510372cb7e (patch) | |
| tree | fac028f4fd907da8f7c499c2bca4ea615027f88c | |
| parent | cda7b7f22b6860f5e2a509df8baa2004b454d4f1 (diff) | |
| download | cherrypy-git-5ddee992174b183ebe33d1f74b37c1510372cb7e.tar.gz | |
Extract variable 'flow' for better readability.
| -rw-r--r-- | cherrypy/test/test_bus.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/cherrypy/test/test_bus.py b/cherrypy/test/test_bus.py index 6026b47e..922a8b24 100644 --- a/cherrypy/test/test_bus.py +++ b/cherrypy/test/test_bus.py @@ -179,12 +179,14 @@ class BusMethodTests(unittest.TestCase): time.sleep(0.2) getattr(b, method)() - for method, states in [('start', [b.states.STARTED]), - ('stop', [b.states.STOPPED]), - ('start', - [b.states.STARTING, b.states.STARTED]), - ('exit', [b.states.EXITING]), - ]: + flow = [ + ('start', [b.states.STARTED]), + ('stop', [b.states.STOPPED]), + ('start', [b.states.STARTING, b.states.STARTED]), + ('exit', [b.states.EXITING]), + ] + + for method, states in flow: threading.Thread(target=f, args=(method,)).start() b.wait(states) |
