pytest ImportError软件包

时间:2018-08-31 10:09:27

标签: python pytest importerror

最近尝试测试我的项目,每次都得到以下追溯。

https://paste.gnome.org/pwkpqejza

Python版本3.5.3 pytest 3.6.3

通过CREATE EVENT `user_created_this_month_schedule` ON SCHEDULE EVERY 1 MINUTE STARTS '2018-08-31 15:35:00' ON COMPLETION NOT PRESERVE ENABLE DO update user_data set user_created_this_month = 0 where user_data_id = 7

运行

这些测试在CI中运行良好,因此显然与我的配置有关。

CI配置:平台linux-Python 3.5.3,pytest-3.7.3,py-1.6.0,pluggy-0.7.1-/ usr / bin / python3

编辑:原来是主要由@phd提到的pytest版本引起的问题。这是由于某些版本固定似乎并未影响CI所致。 ./setup.py test --addopts "tests/ -s"为我解决了这个问题。

1 个答案:

答案 0 :(得分:1)

pytest 3.6.3确实没有pytest.python.Packagepytest 3.7.3可以。升级您的pytest