[英]python: pytest for cmd tools
I created a Python library and a set of Python script around it. 我创建了一个Python库和围绕它的一组Python脚本。 An example of this small script could be something like this rna_ex2x.py :
这个小脚本的示例可能是类似rna_ex2x.py的内容 :
./rna_ec2x.py
usage: rna_ec2x.py [-h] [--sep SEP] [--chain CHAIN] [--ec-pairs]
[--ss-pairs SS_PAIRS] [--pairs-delta]
interaction_fn
rna_ec2x.py: error: too few arguments
I want to test these script with pytest. 我想用pytest测试这些脚本。 I know how to test my functions with pytest, but I can't find in the documentation what would be the best practice in testing standalone Python script.
我知道如何使用pytest测试我的功能,但是我无法在文档中找到测试独立Python脚本的最佳实践。 Any suggestions?
有什么建议么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.