mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-10-11 14:24:01 +01:00
Initial commit of open source Workload Automation.
This commit is contained in:
34
wlauto/external/louie/test/test_robustapply.py
vendored
Normal file
34
wlauto/external/louie/test/test_robustapply.py
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import unittest
|
||||
|
||||
from louie.robustapply import robust_apply
|
||||
|
||||
|
||||
def no_argument():
|
||||
pass
|
||||
|
||||
|
||||
def one_argument(blah):
|
||||
pass
|
||||
|
||||
|
||||
def two_arguments(blah, other):
|
||||
pass
|
||||
|
||||
|
||||
class TestRobustApply(unittest.TestCase):
|
||||
|
||||
def test_01(self):
|
||||
robust_apply(no_argument, no_argument)
|
||||
|
||||
def test_02(self):
|
||||
self.assertRaises(TypeError, robust_apply, no_argument, no_argument,
|
||||
'this' )
|
||||
|
||||
def test_03(self):
|
||||
self.assertRaises(TypeError, robust_apply, one_argument, one_argument)
|
||||
|
||||
def test_04(self):
|
||||
"""Raise error on duplication of a particular argument"""
|
||||
self.assertRaises(TypeError, robust_apply, one_argument, one_argument,
|
||||
'this', blah='that')
|
||||
|
Reference in New Issue
Block a user