开发者

How to run all tests in a setup.py script?

开发者 https://www.devze.com 2023-03-23 22:41 出处:网络
I woul开发者_如何学Cd like to write a setup.py script that runs all of my django app\'s tests and fails the installation if one of the tests don\'t pass.

I woul开发者_如何学Cd like to write a setup.py script that runs all of my django app's tests and fails the installation if one of the tests don't pass.

How can it be done? What do I need to do?


Assuming you're using setuptools, check out test build package and run a unittest suite from their docs. which I believe lets you run setup.py test and doesn't install your package, but runs the tests in an egg. From here you can run setup.py install. This does seem to be a new command (my version doesn't have it listed).

0

精彩评论

暂无评论...
验证码 换一张
取 消