Skip to content
This repository was archived by the owner on Oct 12, 2020. It is now read-only.

Commit eed2427

Browse files
committed
(Probably) Fixed the tests
1 parent a0c6736 commit eed2427

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_button.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@ def test_bgchange(qtbot):
8686
image = configureImage(WIDTH, HEIGHT, backgroundcolour=Qt.red)
8787
gridColor = 0
8888
bgColor = 0
89-
for i in range(0, image.size().width()):
90-
for j in range(0, image.size().height()):
89+
image = image.scaled(WIDTH, HEIGHT)
90+
for i in range(0, WIDTH):
91+
for j in range(0, HEIGHT):
9192
p = QPoint(i, j)
9293
if image.pixelColor(p) == Qt.red:
9394
bgColor += 1
@@ -100,8 +101,9 @@ def test_gridchange(qtbot):
100101
image = configureImage(WIDTH, HEIGHT, gridcolour=Qt.red)
101102
gridColor = 0
102103
bgColor = 0
103-
for i in range(0, image.size().width()):
104-
for j in range(0, image.size().height()):
104+
image = image.scaled(WIDTH, HEIGHT)
105+
for i in range(0, WIDTH):
106+
for j in range(0, HEIGHT):
105107
p = QPoint(i, j)
106108
if image.pixelColor(p) == Qt.red:
107109
bgColor += 1

0 commit comments

Comments
 (0)