Я впервые пробую юнит-тесты Python, ссылаясь на эту статью .У меня в Eclipse установлен плагин PyDev.
Мой test_hello.py
выглядит следующим образом:
import unittest
class TestHello(unittest.TestCase):
def test_abc(self):
print("Test!!!")
result = True
self.assertEqual(result, True, "ohno")
Когда я Right click on source > Run As > Python unit-test
, он выводит:
Finding files... done.
Importing test modules ... PYTHONPATH not found for file: D:\workspaces\python-ws\test\test_h
done.
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Также на вкладке PyUnit ничего не отображается:
![enter image description here](https://i.stack.imgur.com/PTbVp.png)
Что мне здесь не хватает?
Обновление
Добавление более подробной информации:
Мой проект:
![enter image description here](https://i.stack.imgur.com/zepyy.png)
Проводник пакетов PyDev
![enter image description here](https://i.stack.imgur.com/ZvvUt.png)