Files
pywebview/tests/test_load_html.py
Roman c5ff4e1362 Add test suite (#108)
* 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
2017-04-27 16:08:51 +03:00

21 lines
436 B
Python

import pytest
import threading
from .util import run_test, destroy_window
def load_html():
import webview
def _load_html(webview):
webview.load_html('<h1>This is dynamically loaded HTML</h1>')
t = threading.Thread(target=_load_html, args=(webview,))
t.start()
destroy_window(webview)
webview.create_window('Load html test', 'https://www.example.org')
def test_load_html():
run_test(load_html)