Skip to content

Commit 7fa14bd

Browse files
committed
Avoid float-equality in monitor scale assertion (Sonar S1244)
1 parent 5208294 commit 7fa14bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/unit_test/headless/test_monitor_layout_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_enumerate_monitors_with_injected_provider():
6464
{"x": 1920, "y": 0, "width": 1280, "height": 1024, "scale": 1.5}]
6565
mons = enumerate_monitors(provider=lambda: rows)
6666
assert [m.index for m in mons] == [0, 1]
67-
assert mons[0].primary is True and mons[1].scale == 1.5
67+
assert mons[0].primary is True and abs(mons[1].scale - 1.5) < 1e-9
6868
assert mons[1].x == 1920
6969

7070

0 commit comments

Comments
 (0)