Skip to content

Commit 0b275a2

Browse files
Add tolerance for flaky test
1 parent 053c3c3 commit 0b275a2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tasks/cobra_heatmaps/tests.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import numpy as np
12
import pytest
23
from pytest_lazy_fixtures import lf
34
from tasks.utils import initialize, parametrize_invocation
@@ -34,7 +35,11 @@ def test_num_heatmaps(invocation: ToolRunResult, expected_num_heatmaps: int):
3435
def test_byte_size_heatmaps(
3536
invocation: ToolRunResult, expected_byte_size_heatmaps: int
3637
):
37-
assert invocation.result["byte_size_heatmaps"] == expected_byte_size_heatmaps
38+
np.testing.assert_almost_equal(
39+
invocation.result["byte_size_heatmaps"],
40+
expected_byte_size_heatmaps,
41+
decimal=-2,
42+
)
3843

3944

4045
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)