尝试使用pyd运行python unittest时的重要错误

2024-06-07 16:17:46 发布

您现在位置:Python中文网/ 问答频道 /正文

在尝试用PyDev将模块作为python unittest运行时,出现以下错误。在

Finding files...
['C:\\Projectos\\spa\\sensor\\src\\test\\test_sensor.py'] ... done
Importing test modules ... Traceback (most recent call last):
  File "C:\eclipse\plugins\org.python.pydev.debug_1.6.3.2010100513\pysrc\runfiles.py", line 342, in __get_module_from_str
    mod = __import__(modname)
ImportError: No module named :\Projectos\spa\sensor\src\test\test_sensor
ERROR: Module: :\Projectos\spa\sensor\src\test\test_sensor could not be imported.
done.

我注意到错误中的路径:Module:line以“:\”开头,但我不知道是什么原因造成的。在

有什么想法吗?在

谢谢。在


Tags: 模块pytestsrc错误lineunittestsensor

热门问题