Import error shows while running test module in pycharm editor
Facing this error while running test from editor.
Error
Traceback (most recent call last):
File "C:\Python27\lib\unittest\case.py", line 329, in run
testMethod()
File "C:\Python27\lib\unittest\loader.py", line 32, in testFailure
raise exception
ImportError: Failed to import test module: test_selfun
Traceback (most recent call last):
File "C:\Python27\lib\unittest\loader.py", line 254, in _find_tests
module = self._get_module_from_name(name)
File "C:\Python27\lib\unittest\loader.py", line 232, in _get_module_from_name
__import__(name)
File "C:\Users\Mansi\PycharmProjects\DSVV_link_solve\test_selfun.py", line 2, in <module>
from dsvv_link.selfun import selfun
ImportError: No module named selfun
So can anyone help me to fix this problem ?
Please sign in to leave a comment.
Hello.
Does it work when you run it from command line? Please try to click "selfun" on test_selfun.py, line 2 in PyCharm. Does it take you to the file?