Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 1 | # Copyright (C) 2016 Intel Corporation |
| 2 | # Released under the MIT license (see COPYING.MIT) |
| 3 | |
| 4 | from time import sleep |
| 5 | |
| 6 | from oeqa.core.case import OETestCase |
| 7 | from oeqa.core.decorator.oetimeout import OETimeout |
| 8 | |
| 9 | class 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?') |