首页 > 解决方案 > 可以捆绑毒物测试环境吗?

问题描述

是否可以将tox测试环境捆绑在一起?想象一下,我有以下tox配置:

[tox]

[testenv:foo-bar]
skip_install = True
commands = python -c "print('foo-bar')"

[testenv:foo-baz]
skip_install = True
commands = python -c "print('foo-baz')"

我想要的行为是调用tox -e foo,这会自动调用foo-barand foo-baz。我尝试使用以下depends设置:

[testenv:foo]
depends = foo-bar, foo-baz
commands = python -c "print('foo')"

要么我误解了它的含义,要么它不起作用,因为这是我tox -e foo的空输出setup.py

GLOB sdist-make: /home/user/testtox/setup.py
foo create: /home/user/testtox/.tox/foo
foo inst: /home/user/testtox/.tox/.tmp/package/1/UNKNOWN-0.0.0.zip
foo installed: UNKNOWN @ file:///home/user/testtox/.tox/.tmp/package/1/UNKNOWN-0.0.0.zip
foo run-test-pre: PYTHONHASHSEED='125196572'
foo run-test: commands[0] | python -c 'print('"'"'foo'"'"')'
foo
______________________________________ summary _______________________________________
  foo: commands succeeded
  congratulations :)

标签: pythontox

解决方案


推荐阅读