mirror of
https://github.com/allankoechke/pywebview.git
synced 2026-12-02 01:33:02 +00:00
* Add preliminary tests * Tests experimentations * Cosmetic changes * Add preliminary tests * Tests experimentations * Cosmetic changes * Make tests work on GTK/QT * Fix confirm_quit on QT * Add possibility to use env variables in config * Add destroy event on event close in GTK * Add queue to test_url_load * Refine OSX tests
26 lines
487 B
Python
26 lines
487 B
Python
import threading
|
|
import time
|
|
import sys
|
|
from multiprocessing import Process
|
|
|
|
|
|
def destroy_window(webview, delay=3):
|
|
def stop():
|
|
time.sleep(delay)
|
|
webview.destroy_window()
|
|
|
|
if sys.platform == 'darwin':
|
|
from util_cocoa import mouseMoveRelative
|
|
|
|
mouseMoveRelative(1, 1)
|
|
|
|
t = threading.Thread(target=stop)
|
|
t.start()
|
|
|
|
|
|
def run_test(test_func):
|
|
p = Process(target=test_func)
|
|
p.start()
|
|
p.join()
|
|
assert p.exitcode == 0
|