首页 新闻 会员 周边 捐助

Pycharm运行报错 ,求帮忙

0
悬赏园豆:50 [已解决问题] 解决于 2019-09-29 19:03

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

大侠与小朋友的主页 大侠与小朋友 | 初学一级 | 园豆:157
提问于:2019-08-28 14:32
< >
分享
最佳答案
1

检查一下log_file_name = "record_run_result.txt"这句代码附近有没有空格或者tab,有的话看看空格个数对不对。

收获园豆:50
Masako | 小虾三级 |园豆:1893 | 2019-08-29 15:09
其他回答(1)
0

报错原因:no tests were found
从这方面入手
做日志模块封装,类名不要以test开头

小菜鸡的梦想 | 园豆:206 (菜鸟二级) | 2019-08-28 15:16
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册