Project restart
This commit is contained in:
12
test/validation/items/cycle/cycle.py
Normal file
12
test/validation/items/cycle/cycle.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
def donothing():
|
||||
return 0
|
||||
|
||||
def checkloopparam(loop_param):
|
||||
if not(loop_param==12 or loop_param==20 or loop_param==30):
|
||||
raise
|
||||
return 0
|
||||
|
||||
def exitcondition(loop):
|
||||
if loop == 3:
|
||||
return True
|
||||
1
test/validation/items/cycle/param.yaml
Normal file
1
test/validation/items/cycle/param.yaml
Normal file
@@ -0,0 +1 @@
|
||||
no_param: Null
|
||||
34
test/validation/items/cycle/test.tum
Normal file
34
test/validation/items/cycle/test.tum
Normal file
@@ -0,0 +1,34 @@
|
||||
- loop:
|
||||
name: Cycle number of loops
|
||||
iterator: 10
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- py_func:
|
||||
name: do nothing
|
||||
file: $(test_path)$(psep)cycle.py
|
||||
func_name: donothing
|
||||
|
||||
- loop:
|
||||
name: Cycle iterating on list
|
||||
iterator: [12, 20, 30]
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- py_func:
|
||||
name: check loop param
|
||||
file: $(test_path)$(psep)cycle.py
|
||||
func_name: checkloopparam
|
||||
param:
|
||||
- $(loop_param)
|
||||
|
||||
- loop:
|
||||
name: Infinite loop with exit condition
|
||||
key: $(test)_PASS
|
||||
steps:
|
||||
- py_func:
|
||||
name: do nothing
|
||||
file: $(test_path)$(psep)cycle.py
|
||||
func_name: donothing
|
||||
|
||||
exit_condition:
|
||||
file: $(test_path)$(psep)cycle.py
|
||||
func_name: exitcondition
|
||||
Reference in New Issue
Block a user