summaryrefslogtreecommitdiff
path: root/cherrypy
diff options
context:
space:
mode:
authorChristian Clauss <cclauss@me.com>2020-11-29 00:24:52 +0100
committerGitHub <noreply@github.com>2020-11-29 00:24:52 +0100
commitf49e3571c080984fae8b96e829e035c17619dac7 (patch)
treeea77970fa28b5043c1cdfb72bac6d4d1d52626bf /cherrypy
parent4912fca4867c614168e366caf185df5e0b972ca5 (diff)
downloadcherrypy-git-f49e3571c080984fae8b96e829e035c17619dac7.tar.gz
Fix text_block() to ignore the final message
Diffstat (limited to 'cherrypy')
-rw-r--r--cherrypy/test/test_bus.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/cherrypy/test/test_bus.py b/cherrypy/test/test_bus.py
index 0efdee38..843a24b5 100644
--- a/cherrypy/test/test_bus.py
+++ b/cherrypy/test/test_bus.py
@@ -261,10 +261,15 @@ def test_block(bus, log_tracker):
# The last message will mention an indeterminable thread name; ignore
# it
- assert (log_tracker.log_entries[:-1] ==
- ['Bus STOPPING', 'Bus STOPPED',
- 'Bus EXITING', 'Bus EXITED',
- 'Waiting for child threads to terminate...'])
+ expected = [
+ "Bus STOPPING",
+ "Bus STOPPED",
+ "Bus EXITING",
+ "Bus EXITED",
+ "Waiting for child threads to terminate...",
+ ]
+ # If the last message mentions an indeterminable thread name then ignore it
+ assert expected in (log_tracker.log_entries, log_tracker.log_entries[:-1])
def test_start_with_callback(bus):