We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e1895f commit e79032dCopy full SHA for e79032d
webview/util.py
@@ -68,7 +68,7 @@ def get_app_root() -> str:
68
if getattr(sys, 'frozen', False): # cx_freeze
69
return os.path.dirname(sys.executable)
70
71
- if os.getenv('PYTEST_CURRENT_TEST'):
+ if 'pytest' in sys.modules and os.getenv('PYTEST_CURRENT_TEST'):
72
test_file = os.getenv('PYTEST_CURRENT_TEST').split('::')[0]
73
74
return os.path.dirname(os.path.join(os.getcwd(), test_file))
0 commit comments