是否可以将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-bar
和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 :)