Skip to content

Commit fe8c00a

Browse files
committed
Fix wolph#146
Skipped Tests on windows, where timer resolution is not thant fine granular as expected by the test.
1 parent dc36d4a commit fe8c00a

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

tests/test_failure.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sys
2+
13
import pytest
24
import progressbar
35

@@ -94,6 +96,9 @@ def test_deprecated_poll():
9496
progressbar.ProgressBar(poll=5)
9597

9698

99+
@pytest.mark.skipif(sys.platform == "win32",
100+
reason="resolution of timer is expected to be on windows "
101+
"lower")
97102
def test_unexpected_update_keyword_arg():
98103
p = progressbar.ProgressBar(max_value=10)
99104
with pytest.raises(TypeError):

tests/test_timer.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
import progressbar
1+
import sys
22
from datetime import timedelta
33

4+
import pytest
5+
import progressbar
6+
47

58
def test_poll_interval():
69
# Test int, float and timedelta intervals
@@ -21,6 +24,9 @@ def test_poll_interval():
2124
assert bar.poll_interval.microseconds < 1001
2225

2326

27+
@pytest.mark.skipif(sys.platform == "win32",
28+
reason="resolution of timer is expected to be on windows "
29+
"lower")
2430
def test_intervals():
2531
bar = progressbar.ProgressBar(max_value=100)
2632
bar._MINIMUM_UPDATE_INTERVAL = 1

0 commit comments

Comments
 (0)