5
5
from PySide2 .QtCore import Qt , QPoint
6
6
from os import path
7
7
8
- def test_coordBox (qtbot ):
8
+ def test_coordBox (qtbot , qapp ):
9
+ print (qapp .instance ())
9
10
window = Graph ()
10
11
window .setImage (QtGui .QImage ("resources/graph.png" ))
11
12
@@ -23,7 +24,7 @@ def test_coordBox(qtbot):
23
24
assert i [0 ].text () == '0' , str
24
25
assert i [1 ].text () == '0' , str
25
26
26
- def test_draw (qtbot ):
27
+ def test_draw (qtbot , qapp ):
27
28
window = Graph ()
28
29
window .setImage (QtGui .QImage ("resources/graph.png" ))
29
30
@@ -44,7 +45,7 @@ def test_draw(qtbot):
44
45
'not working' )
45
46
46
47
47
- def test_save (qtbot , tmpdir_factory ):
48
+ def test_save (qtbot , qapp , tmpdir_factory ):
48
49
window = Graph ()
49
50
window .setImage (QtGui .QImage ("resources/graph.png" ))
50
51
@@ -63,7 +64,7 @@ def test_save(qtbot, tmpdir_factory):
63
64
assert fn .join ("img.png" ).check () is True , ('Save button '
64
65
'is not working' )
65
66
66
- def test_intInput (qtbot ):
67
+ def test_intInput (qtbot , qapp ):
67
68
window = Graph ()
68
69
window .setImage (QtGui .QImage ("resources/graph.png" ))
69
70
@@ -81,7 +82,7 @@ def test_intInput(qtbot):
81
82
assert 'A' not in i [0 ].text (), str
82
83
assert 'A' not in i [1 ].text (), str
83
84
84
- def test_bgchange (qtbot ):
85
+ def test_bgchange (qtbot , qapp ):
85
86
WIDTH = 599
86
87
HEIGHT = 599
87
88
image = configureImage (WIDTH , HEIGHT , backgroundcolour = Qt .red )
@@ -99,7 +100,7 @@ def test_bgchange(qtbot):
99
100
100
101
assert (bgColor > gridColor ) is True , 'Background colour of the graph is not getting changed'
101
102
102
- def test_gridchange (qtbot ):
103
+ def test_gridchange (qtbot , qapp ):
103
104
WIDTH = 599
104
105
HEIGHT = 599
105
106
image = configureImage (WIDTH , HEIGHT , gridcolour = Qt .red , backgroundcolour = Qt .transparent )
0 commit comments