0

在 Maven 中,当我运行测试时,会自动获取 src/ 中的源。

现在我以类似的 dir 结构组织我的 python 代码。但是当我运行 unitttests 时, python -m unittests tests 它说找不到正在测试的类。

我怎样才能让它找到源头?

(好吧,我可以编写一个 shell 脚本并设置 PYTHONPATH,但我不知道这是否是在 python 中的惯用方式)

谢谢杨

4

0 回答 0