e796618c64
Resolves: RHEL-62167
37 lines
750 B
Python
Executable File
37 lines
750 B
Python
Executable File
#!/usr/bin/python3
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
import sys
|
|
|
|
from pycotap import TAPTestRunner
|
|
from pycotap import LogMode
|
|
|
|
|
|
class SimpleTest(unittest.TestCase):
|
|
@classmethod
|
|
def function_name(cls):
|
|
return sys._getframe().f_back.f_code.co_name
|
|
|
|
@classmethod
|
|
def setUpClass(cls):
|
|
print(cls.function_name())
|
|
|
|
def setUp(self):
|
|
print(SimpleTest.function_name())
|
|
|
|
def main(self):
|
|
print(SimpleTest.function_name())
|
|
|
|
def test_foo(self):
|
|
print(SimpleTest.function_name())
|
|
|
|
|
|
def main():
|
|
loader = unittest.TestLoader()
|
|
runner = TAPTestRunner(test_output_log=LogMode.LogToError)
|
|
unittest.main(testRunner=runner, testLoader=loader)
|
|
|
|
if __name__ == '__main__':
|
|
main()
|