gpt4 book ai didi

python - 如何针对不同的 Python *补丁* 版本测试库?

转载 作者:行者123 更新时间:2023-11-28 20:35:07 25 4
gpt4 key购买 nike

我正在编写一个库并想针对不同的 Python 补丁版本进行测试,例如 3.7.1、3.7.2 等

我已经使用 tox 很长时间了,但是,根据这个 answer ,它并不真正支持这种用法。

有什么建议吗?

最佳答案

对于针对 3.8.1 的检查之一(假设您的 python3.8 指向 3.8.2),您可以使用 discover flag

tox --discover /path/to/python3.8.1 -e py38

如果你想定义一个始终使用 3.8.1 的环境,你可以通过定义一个新的 tox 环境并设置 basepython 来实现。作为 python3.8.1

[testenv:py381]
basepython = python3.8.1

[testenv:py382]
basepython = python3.8.2

关于python - 如何针对不同的 Python *补丁* 版本测试库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57245532/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com