I ran the osetests --rednose --nocapture test_report.py
I got type
for print(cls.__class__.__name__)
, but I expected TestReport
and /usr/local/bin/nosetests
for os.path.splitext(sys.modules['__main__'].__file__)[0]
, but I expected test_report
How to get it ?
class TestReport(unittest.TestCase):
@classmethod
def setup_class(cls):
print(cls.__class__.__name__)
ap(os.path.splitext(sys.modules['__main__'].__file__))
TESTING_NAME=os.path.splitext(sys.modules['__main__'].__file__)[0]
print("testing script name:"+TESTING_NAME)