mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
PyFalkon: Add basictest
This commit is contained in:
parent
18cf0ce480
commit
fd8cc0b356
|
@ -7,3 +7,7 @@ endmacro()
|
|||
|
||||
add_executable(pyfalkontestrunner pyfalkontestrunner.cpp)
|
||||
target_link_libraries(pyfalkontestrunner FalkonPrivate Qt5::Test)
|
||||
|
||||
pyfalkon_tests(
|
||||
basictest
|
||||
)
|
||||
|
|
20
src/plugins/PyFalkon/autotests/basictest.py
Normal file
20
src/plugins/PyFalkon/autotests/basictest.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import Falkon
|
||||
import unittest
|
||||
|
||||
class BasicTest(unittest.TestCase):
|
||||
|
||||
def test_module_version(self):
|
||||
self.assertEqual(Falkon.__version__.count('.'), 2)
|
||||
self.assertIsNotNone(Falkon.registerPlugin)
|
||||
|
||||
def test_mainapplication(self):
|
||||
self.assertIsNotNone(Falkon.MainApplication.instance())
|
||||
|
||||
def test_create_window(self):
|
||||
window = Falkon.MainApplication.instance().createWindow(Falkon.Qz.BW_NewWindow)
|
||||
self.assertIsNotNone(window)
|
||||
|
||||
|
||||
suite = unittest.defaultTestLoader.loadTestsFromTestCase(BasicTest)
|
||||
if unittest.TextTestRunner().run(suite).failures:
|
||||
raise(Exception("FAIL"))
|
Loading…
Reference in New Issue
Block a user