Skip to content

Commit 695cfae

Browse files
committed
global tolerance for probscale tests
1 parent 29d1c8e commit 695cfae

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

probscale/tests/test_probscale.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sys
2-
PYTHON27 = sys.version_info.major == 2
32

43
import numpy
54
import matplotlib.pyplot as plt
@@ -15,6 +14,10 @@
1514
from probscale.probscale import _minimal_norm
1615

1716

17+
PYTHON27 = sys.version_info.major == 2
18+
TOLERANCE = 22
19+
20+
1821
@pytest.fixture
1922
def mn():
2023
return _minimal_norm()
@@ -72,7 +75,7 @@ def test_minimal_norm_cdf(mn, mn_input):
7275

7376
@pytest.mark.mpl_image_compare(
7477
baseline_dir='baseline_images/test_probscale',
75-
tolerance=15
78+
tolerance=TOLERANCE
7679
)
7780
@pytest.mark.skipif(PYTHON27, reason="legacy python")
7881
def test_the_scale_default():
@@ -85,7 +88,7 @@ def test_the_scale_default():
8588

8689
@pytest.mark.mpl_image_compare(
8790
baseline_dir='baseline_images/test_probscale',
88-
tolerance=15
91+
tolerance=TOLERANCE
8992
)
9093
def test_the_scale_not_as_pct():
9194
fig, ax = plt.subplots(figsize=(4, 8))

0 commit comments

Comments
 (0)