Source code for UseCases.unittest_subprocess.binaries.opts.exitign.True.CallCase
"""
Default case for a testee with result: succeed: OK
EXIT:
0
STDOUT:
arbitrary output
arbitrary signalling OK string
arbitrary output
STDERR:
-
The actual unittest is processed within the subprocess, the current call
is used as an ordinary subprocess caller.
Call options:
--exitign=True
"""
from __future__ import absolute_import
from __future__ import print_function
__author__ = 'Arno-Can Uestuensoez'
__license__ = "Artistic-License-2.0 + Forced-Fairplay-Constraints"
__copyright__ = "Copyright (C) 2010-2016 Arno-Can Uestuensoez @Ingenieurbuero Arno-Can Uestuensoez"
__version__ = '0.0.1'
__uuid__='9de52399-7752-4633-9fdc-66c87a9200b8'
__docformat__ = "restructuredtext en"
import unittest
from testdata import epyu,call_scripy
from epyunit.unittest.subprocess import TestExecutable
#
#######################
#
[docs]class CallUnits(TestExecutable):
@classmethod
[docs] def setUpClass(cls):
cls.cache = True
[docs] def setUp(self):
self.call = epyu
self.call += " --passall "
# test: self.call += " --rdbg "
self.call += " -- " + call_scripy
self.call += " EXIT9OK3NOK2 "
self.retX = [9, ['fromH', 'OK', 'OK', 'OK'], ['NOK', 'NOK', ]]
[docs] def testCase000(self):
ret = self.callSubprocess(self.call)
self.assertEqual(self.retX,ret)
pass
[docs] def testCase010(self):
self.call = epyu
# self.call += " --rdbg "
self.call += " --passall "
self.call += " -- "
self.call += call_scripy
self.call += " EXIT9OK3NOK2 "
self.callSubprocess(self.call)
self.assertEqual(self.retX)
pass
[docs] def testCase020(self):
self.call = epyu
# self.call += " --rdbg "
self.call += " --passall "
self.call += call_scripy
self.call += " EXIT9OK3NOK2 "
self.callSubprocess(self.call)
self.assertEqual(self.retX)
pass
#
#######################
#
if __name__ == '__main__':
unittest.main()