From fd4075835e5a64bcf6b070ad3fd9479d0f67c457 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Mon, 9 May 2016 11:10:31 +0100 Subject: [PATCH] Mark optional sleeps with no coverage Codecov frequently whinges about "unexpected coverage changes" on PRs; this is because the sleep lines affected sometimes execute and sometimes don't (they're only there to ensure something exists before we test it). Hopefully codecov notices the pragmas... --- tests/test_boards.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_boards.py b/tests/test_boards.py index 534a6f9..062ae2a 100644 --- a/tests/test_boards.py +++ b/tests/test_boards.py @@ -189,7 +189,7 @@ def test_led_board_blink_control(): board.blink(0.1, 0.1, n=2) # make sure the blink thread's started while not board._blink_leds: - sleep(0.00001) + sleep(0.00001) # pragma: no cover board[1][0].off() # immediately take over the second LED board._blink_thread.join() # naughty, but ensures no arbitrary waits in the test test = [ @@ -236,7 +236,7 @@ def test_led_board_blink_control_all(): board.blink(0.1, 0.1, n=2) # make sure the blink thread's started while not board._blink_leds: - sleep(0.00001) + sleep(0.00001) # pragma: no cover board[0].off() # immediately take over all LEDs board[1][0].off() board[1][1].off()