From 9ec885f53b6b68eeac8056fa3e44430399e3dd3f Mon Sep 17 00:00:00 2001 From: tshirtman Date: Sun, 7 Oct 2012 01:26:40 +0200 Subject: [PATCH] add a test suite for App(), only two tests for now --- kivy/tests/test_app.py | 18 ++++++++++++++++++ kivy/tests/testkv.kv | 1 + 2 files changed, 19 insertions(+) create mode 100644 kivy/tests/test_app.py create mode 100644 kivy/tests/testkv.kv diff --git a/kivy/tests/test_app.py b/kivy/tests/test_app.py new file mode 100644 index 000000000..1a3139352 --- /dev/null +++ b/kivy/tests/test_app.py @@ -0,0 +1,18 @@ +import unittest +from kivy.app import App +from kivy.clock import Clock + + +class AppTest(unittest.TestCase): + def test_start_raw_app(self): + a = App() + Clock.schedule_once(a.stop, .1) + a.run() + + def test_start_app_with_kv(self): + class TestKvApp(App): + pass + + a = TestKvApp() + Clock.schedule_once(a.stop, .1) + a.run() diff --git a/kivy/tests/testkv.kv b/kivy/tests/testkv.kv new file mode 100644 index 000000000..3a7733d9f --- /dev/null +++ b/kivy/tests/testkv.kv @@ -0,0 +1 @@ +#:kivy 1.4.1