Skip to content

Commit 62ed18f

Browse files
committed
Appveyor debug
1 parent e57bcf1 commit 62ed18f

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

tests/conftest.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ def reload_webview():
77

88
reload(webview)
99

10+
@pytest.fixture(autouse=True)
11+
def set_env():
12+
import os
13+
14+
os.environ['PYWEBVIEW_TEST'] = 'true'
15+
1016

1117
# @pytest.fixture(autouse=True)
1218
# def set_gui():

webview/platforms/cocoa.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def windowWillClose_(self, notification):
107107
i.closed.set()
108108
if BrowserView.instances == {}:
109109
BrowserView.app.stop_(self)
110-
logger.info('Window closed')
110+
BrowserView.app.terminate_(self)
111+
logger.info('Application stopped')
111112

112113
def windowDidResize_(self, notification):
113114
i = BrowserView.get_instance('window', notification.object())

webview/util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def get_app_root() -> str:
6969
if getattr(sys, 'frozen', False): # cx_freeze
7070
return os.path.dirname(sys.executable)
7171

72-
if 'pytest' in sys.modules and os.getenv('PYTEST_CURRENT_TEST'):
72+
if 'pytest' in sys.modules and os.getenv('PYWEBVIEW_TEST'):
7373
return os.path.join(os.path.dirname(__file__), '..', 'tests')
7474

7575
if hasattr(sys, 'getandroidapilevel'):

0 commit comments

Comments
 (0)