# HG changeset patch # User Augie Fackler # Date 1496191620 14400 # Node ID c59451e11cbfec538ef7b3dd612ce750020d38a3 # Parent 3ce53a49933423c1112748399be68ae014449c32 tests: make run-tests fail early if no channel is found I hit a weird corner case in run-tests where a test that caused an exception to be raised was breaking everything with an unbound variable error a few lines down because channel was never getting set in this for loop. By adding an `else` clause to this for loop, we can explode right away if we can't find a channel and give the developer a better chance at figuring out what's going on. diff -r 3ce53a499334 -r c59451e11cbf tests/run-tests.py --- a/tests/run-tests.py Sun May 28 15:47:00 2017 -0400 +++ b/tests/run-tests.py Tue May 30 20:47:00 2017 -0400 @@ -1767,6 +1767,8 @@ if not v: channel = n break + else: + raise ValueError('Could not find output channel') channels[channel] = "=" + test.name[5:].split(".")[0] try: test(result)