При запуске командной строки я получаю ошибки импорта модуля.

pytest.ini:
Код: Выделить всё
[pytest]
minversion = 7.0
addopts = --cov --cov-report=html:converter_coverage
pythonpath = src/converter
testpaths =
tests
Код: Выделить всё
from converter.question_parser import readSingleFile, getAllQuestionsFromFiles
def test_ifTheLanguageIsDutch_andValidTextInputIsGiven_ThenAQuestionIsMade():
foundQuestions = readSingleFile("tests/resources/SingleMinimalQuestion_NL.txt", "NL")
assert len(foundQuestions) == 1
question = foundQuestions[0]
assert question.longQuestion == "This is the long question?"
assert question.shortQuestion == "This is the short question?"
assert question.answer == "This is the answer"
assert question.category == "This is the category"
assert question.round == "This is the round"
Код: Выделить всё
_________________________________________________________________ ERROR collecting tests/test_question_parser.py __________________________________________________________________
ImportError while importing test module 'C:\Users\peter\Projects\kwismaster\converter\tests\test_question_parser.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..\..\..\..\AppData\Local\Programs\Python\Python312\Lib\importlib\__init__.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test_question_parser.py:1: in
from converter.question_parser import readSingleFile, getAllQuestionsFromFiles
E ModuleNotFoundError: No module named 'converter'

Я попытался изменить путь в pytest.ini, но ничего не дало.
Если я изменю оператор импорта, включив в него src. и pythonpath будет . src src/converter тест будет работать с командной строкой и pycharm, но выдаст ошибки импорта, что отключает навигацию по кликам pycharm.
Любое решение, которое работает с командной строкой pytest( для действий jenkins или github или...), а также pycharm (для разработки в течение двух дней) с работой навигации по кликам приветствуется!
Подробнее здесь: https://stackoverflow.com/questions/791 ... ine-pytest
Мобильная версия