Traceback (most recent call last):
File "G:\PyCharm 2019.2.1\helpers\pycharm_jb_unittest_runner.py", line 35, in <module>
main(argv=args, module=None, testRunner=unittestpy.TeamcityTestRunner, buffer=not JB_DISABLE_BUFFERING)
File "E:\python3.7.3\lib\unittest\main.py", line 100, in init
self.parseArgs(argv)
File "E:\python3.7.3\lib\unittest\main.py", line 147, in parseArgs
self.createTests()
File "E:\python3.7.3\lib\unittest\main.py", line 159, in createTests
self.module)
File "E:\python3.7.3\lib\unittest\loader.py", line 220, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "E:\python3.7.3\lib\unittest\loader.py", line 220, in <listcomp>
suites = [self.loadTestsFromName(name, module) for name in names]
File "E:\python3.7.3\lib\unittest\loader.py", line 154, in loadTestsFromName
module = import(module_name)
File "F:\Python_Automated_Testing_Class\My_study\Python_unittest_TestDivide.py", line 72
log_file_name = "record_run_result.txt"
^
TabError: inconsistent use of tabs and spaces in indentation
Process finished with exit code 1
Empty suite
检查一下log_file_name = "record_run_result.txt"
这句代码附近有没有空格或者tab,有的话看看空格个数对不对。
报错原因:no tests were found
从这方面入手
做日志模块封装,类名不要以test开头