summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/tests/cases/timeout.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/core/tests/cases/timeout.py')
-rw-r--r--meta/lib/oeqa/core/tests/cases/timeout.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/tests/cases/timeout.py b/meta/lib/oeqa/core/tests/cases/timeout.py
new file mode 100644
index 0000000000..870c3157f7
--- /dev/null
+++ b/meta/lib/oeqa/core/tests/cases/timeout.py
@@ -0,0 +1,18 @@
1# Copyright (C) 2016 Intel Corporation
2# Released under the MIT license (see COPYING.MIT)
3
4from time import sleep
5
6from oeqa.core.case import OETestCase
7from oeqa.core.decorator.oetimeout import OETimeout
8
9class TimeoutTest(OETestCase):
10
11 @OETimeout(1)
12 def testTimeoutPass(self):
13 self.assertTrue(True, msg='How is this possible?')
14
15 @OETimeout(1)
16 def testTimeoutFail(self):
17 sleep(2)
18 self.assertTrue(True, msg='How is this possible?')