Skip to content

Commit 1e72206

Browse files
committed
Fuzzify move window test
1 parent 44033b8 commit 1e72206

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test_move_window.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44

55
from .util import run_test
66

7-
@pytest.mark.skip
87
def test_xy():
98
window = webview.create_window('xy test', x=200, y=200, width=100, height=100)
109
run_test(webview, window, xy)
1110

1211

13-
@pytest.mark.skip
1412
def test_move_window():
1513
window = webview.create_window('Move window test', x=200, y=200, width=100, height=100)
1614
run_test(webview, window, move_window)
1715

1816

1917
def xy(window):
20-
assert window.x == 200
21-
assert window.y == 200
18+
# Coordinates are not always exact due to window manager decorations
19+
assert abs(window.x - 200) < 10
20+
assert abs(window.y - 200) < 10
2221

2322

2423
def move_window(window):
24+
# Coordinates are not always exact due to window manager decorations
2525
window.move(300, 300)
2626
sleep(1)
2727

28-
assert window.x == 300
29-
assert window.y == 300
28+
assert abs(window.x - 300) < 10
29+
assert abs(window.y - 300) < 10

0 commit comments

Comments
 (0)