Discuss / Python / 导入unittest模块问题

导入unittest模块问题

Topic source

风笛手-

#1 Created at ... [Delete] [Delete and Lock User]

为什么按老师的代码敲了之后,显示模块unittest中没有TestCase这个对象

风笛手-

#2 Created at ... [Delete] [Delete and Lock User]

代码: Traceback (most recent call last): File "C:/Users/Administrator.ZH-20180820LBYA/AppData/Local/Programs/Python/Python37/unittest.py", line 13, in <module> import unittest File "C:/Users/Administrator.ZH-20180820LBYA/AppData/Local/Programs/Python/Python37\unittest.py", line 15, in <module> class TestDict(unittest.TestCase): AttributeError: module 'unittest' has no attribute 'TestCase'

苏生不语_

#3 Created at ... [Delete] [Delete and Lock User]

你文件名字是不是和 unittest 重复了


  • 1

Reply