这是我的 tox.ini 文件:
dino@DINO:~/code/mplfinance$ cat tox.ini
[tox]
envlist = py36, py37, py38
[pytest]
python_files = tests.py
[testenv]
deps =
matplotlib
numpy
pandas
pytest
setenv =
# don't use interactive backend for matplotlib in e2e tests
MPLBACKEND = agg
commands =
pytest
Run Code Online (Sandbox Code Playgroud)
当我运行tox<Enter>
它时,它会为指定的三个环境中的每一个启动 pytest。当 pytest 首次启动时(对于每个环境),它会报告 Python 的版本以及它正在使用的其他一些东西。例如,py36
我看到:
py36 runtests: PYTHONHASHSEED='893013612'
py36 runtests: commands[0] | pytest
============= test session starts ==============
platform linux -- Python 3.6.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dino/code/mplfinance, inifile: tox.ini
collected 2 items
tests.py .. [100%]
=========== 2 passed in 13.48s ==============
Run Code Online (Sandbox Code Playgroud)
它说py36 runtests: ...
然后它说platform linux -- Python 3.6.7, ...
一切都很好。
同样,我看到
py37 runtests: PYTHONHASHSEED='893013612'
py37 runtests: commands[0] | pytest
======================== test session starts ==================
platform linux -- Python 3.7.4, ...
Run Code Online (Sandbox Code Playgroud)
一切又好了。
py38 runtests: PYTHONHASHSEED='893013612'
py38 runtests: commands[0] | pytest
============ test session starts ==================
platform linux -- Python 3.6.7, pytest-5.4.1, py-1.8.1, pluggy-0.13.1
rootdir: /home/dino/code/mplfinance, inifile: tox.ini
collected 2 items
tests.py .. [100%]
============== 2 passed in 16.19s ====================
Run Code Online (Sandbox Code Playgroud)
Python 3.6.7
了py38
???我在这里做错了吗?非常感谢您的帮助!
值得一提的是,这是我运行 WSL 的一般环境信息:
dino@DINO:~/code/mplfinance$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
dino@DINO:~/code/mplfinance$ uname -a
Linux DINO 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
dino@DINO:~/code/mplfinance$ python --version
Python 3.7.4
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
564 次 |
最近记录: |