ModuleNotFoundError with pytest

后端 未结 6 736
时光说笑
时光说笑 2021-02-12 11:05

I want my tests folder separate to my application code. My project structure is like so

myproject/
  myproject/
    myproject.py
    moduleone.py
  tests/
    my         


        
6条回答
  •  佛祖请我去吃肉
    2021-02-12 11:33

    Not sure if this solution was specific to my problem, but I simply add __init__.py to my tests folder and that solved the problem.

提交回复
热议问题