File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,12 @@ def reload_webview():
7
7
8
8
reload (webview )
9
9
10
+ @pytest .fixture (autouse = True )
11
+ def set_env ():
12
+ import os
13
+
14
+ os .environ ['PYWEBVIEW_TEST' ] = 'true'
15
+
10
16
11
17
# @pytest.fixture(autouse=True)
12
18
# def set_gui():
Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ def windowWillClose_(self, notification):
107
107
i .closed .set ()
108
108
if BrowserView .instances == {}:
109
109
BrowserView .app .stop_ (self )
110
- logger .info ('Window closed' )
110
+ BrowserView .app .terminate_ (self )
111
+ logger .info ('Application stopped' )
111
112
112
113
def windowDidResize_ (self , notification ):
113
114
i = BrowserView .get_instance ('window' , notification .object ())
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ def get_app_root() -> str:
69
69
if getattr (sys , 'frozen' , False ): # cx_freeze
70
70
return os .path .dirname (sys .executable )
71
71
72
- if 'pytest' in sys .modules and os .getenv ('PYTEST_CURRENT_TEST ' ):
72
+ if 'pytest' in sys .modules and os .getenv ('PYWEBVIEW_TEST ' ):
73
73
return os .path .join (os .path .dirname (__file__ ), '..' , 'tests' )
74
74
75
75
if hasattr (sys , 'getandroidapilevel' ):
You can’t perform that action at this time.
0 commit comments