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

Commit

Permalink
Fixed the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sumagnadas committed Jun 15, 2020
1 parent eed2427 commit ba9dd6b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_button.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,16 @@ def test_bgchange(qtbot):
assert (bgColor > gridColor) is True, 'Background colour of the graph is not getting changed'

def test_gridchange(qtbot):
image = configureImage(WIDTH, HEIGHT, gridcolour=Qt.red)
image = configureImage(WIDTH, HEIGHT, gridcolour=Qt.red, backgroundcolour=Qt.transparent)
gridColor = 0
bgColor = 0
image = image.scaled(WIDTH, HEIGHT)
for i in range(0, WIDTH):
for j in range(0, HEIGHT):
p = QPoint(i, j)
if image.pixelColor(p) == Qt.red:
bgColor += 1
else:
gridColor += 1
else:
bgColor += 1

assert (gridColor < bgColor) is True, 'Grid colour of the graph is not getting changed'

0 comments on commit ba9dd6b

Please sign in to comment.