Project restart
This commit is contained in:
1
test/validation/items/unittest/param.yaml
Normal file
1
test/validation/items/unittest/param.yaml
Normal file
@@ -0,0 +1 @@
|
||||
no_param: Null
|
||||
13
test/validation/items/unittest/test.tum
Normal file
13
test/validation/items/unittest/test.tum
Normal file
@@ -0,0 +1,13 @@
|
||||
- unittest_file:
|
||||
name: Unittest item
|
||||
test_file: {{include_directory}}/unittest.py
|
||||
key: $(test)_PASS
|
||||
test_method: test_01_pass
|
||||
|
||||
- unittest_file:
|
||||
name: Unittest item
|
||||
test_file: {{include_directory}}/unittest.py
|
||||
key: $(test)_FAIL
|
||||
test_method:
|
||||
- test_04_disabled
|
||||
- test_03_fail
|
||||
37
test/validation/items/unittest/unittest.py
Normal file
37
test/validation/items/unittest/unittest.py
Normal file
@@ -0,0 +1,37 @@
|
||||
import unittest
|
||||
from time import sleep
|
||||
|
||||
class MyUnitTests(unittest.TestCase):
|
||||
@unittest.skip("test skipped")
|
||||
def test_00_skipped(self):
|
||||
''' Test 00 is skipped
|
||||
'''
|
||||
sleep(0.5)
|
||||
|
||||
def test_01_pass(self):
|
||||
''' Test 01 is passed and adds a report key
|
||||
'''
|
||||
self.reported_values['key reported']= 'value_reported'
|
||||
sleep(0.5)
|
||||
|
||||
def test_02_pass(self):
|
||||
''' Test 02 is passed and adds a report key
|
||||
'''
|
||||
self.reported_values['key reported']= 'toto'
|
||||
sleep(0.5)
|
||||
|
||||
def test_03_fail(self):
|
||||
''' Test 03 is fail by unittest method
|
||||
'''
|
||||
sleep(0.5)
|
||||
self.fail(msg='Fail message')
|
||||
|
||||
def test_04_disabled(self):
|
||||
''' Test 04 is disabled
|
||||
'''
|
||||
sleep(0.5)
|
||||
|
||||
def test_05_crash(self):
|
||||
''' Test 05 crashes
|
||||
'''
|
||||
print(crash)
|
||||
Reference in New Issue
Block a user