Merge #16804: test: Remove unused try-block in assert_debug_log
fae91a09c4test: Remove incorrect and unused try-block in assert_debug_log (MarcoFalke) Pull request description: This try block has accidentally been added by me infa3e9f7627. It was unused all the time, but commit6011c9d72dadded a `return` in the finally block, muting all exceptions. This can be tested by adding an `assert False` after any `with ...assert_debug_log...:` line. ACKs for top commit: laanwj: ACKfae91a09c4ryanofsky: utACKfae91a09c4. I didn't know returning inside a `finally` block would cancel pending exceptions or return values, but I guess this makes sense and is a good thing to be aware of. Tree-SHA512: 47ed0165062060e9af055a3e92f1a529cd41d00476bfad64e3cd141ae084d22f926a343bb1257717e164e15459a59ab66aed198c95d18bf780d8cb0b76aa3298
This commit is contained in:
1 file changed
+2
-2
@@ -313,9 +313,9 @@ class TestNode():
|
|||||||
with open(debug_log, encoding='utf-8') as dl:
|
with open(debug_log, encoding='utf-8') as dl:
|
||||||
dl.seek(0, 2)
|
dl.seek(0, 2)
|
||||||
prev_size = dl.tell()
|
prev_size = dl.tell()
|
||||||
try:
|
|
||||||
yield
|
yield
|
||||||
finally:
|
|
||||||
while True:
|
while True:
|
||||||
found = True
|
found = True
|
||||||
with open(debug_log, encoding='utf-8') as dl:
|
with open(debug_log, encoding='utf-8') as dl:
|
||||||
|
|||||||
Reference in new issue
Block a user