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

Commit 2e4883b

Browse files
committed
Fixed the build
1 parent c70a965 commit 2e4883b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/test_button.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
from PySide2.QtCore import Qt, QPoint
66
from os import path
77

8-
def test_coordBox(qtbot):
8+
def test_coordBox(qtbot, qapp):
9+
print(qapp.instance())
910
window = Graph()
1011
window.setImage(QtGui.QImage("resources/graph.png"))
1112

@@ -23,7 +24,7 @@ def test_coordBox(qtbot):
2324
assert i[0].text() == '0', str
2425
assert i[1].text() == '0', str
2526

26-
def test_draw(qtbot):
27+
def test_draw(qtbot, qapp):
2728
window = Graph()
2829
window.setImage(QtGui.QImage("resources/graph.png"))
2930

@@ -44,7 +45,7 @@ def test_draw(qtbot):
4445
'not working')
4546

4647

47-
def test_save(qtbot, tmpdir_factory):
48+
def test_save(qtbot, qapp, tmpdir_factory):
4849
window = Graph()
4950
window.setImage(QtGui.QImage("resources/graph.png"))
5051

@@ -63,7 +64,7 @@ def test_save(qtbot, tmpdir_factory):
6364
assert fn.join("img.png").check() is True, ('Save button '
6465
'is not working')
6566

66-
def test_intInput(qtbot):
67+
def test_intInput(qtbot, qapp):
6768
window = Graph()
6869
window.setImage(QtGui.QImage("resources/graph.png"))
6970

@@ -81,7 +82,7 @@ def test_intInput(qtbot):
8182
assert 'A' not in i[0].text(), str
8283
assert 'A' not in i[1].text(), str
8384

84-
def test_bgchange(qtbot):
85+
def test_bgchange(qtbot, qapp):
8586
WIDTH = 599
8687
HEIGHT = 599
8788
image = configureImage(WIDTH, HEIGHT, backgroundcolour=Qt.red)
@@ -99,7 +100,7 @@ def test_bgchange(qtbot):
99100

100101
assert (bgColor > gridColor) is True, 'Background colour of the graph is not getting changed'
101102

102-
def test_gridchange(qtbot):
103+
def test_gridchange(qtbot, qapp):
103104
WIDTH = 599
104105
HEIGHT = 599
105106
image = configureImage(WIDTH, HEIGHT, gridcolour=Qt.red, backgroundcolour=Qt.transparent)

0 commit comments

Comments
 (0)