Tox WARNING:test command found but not installed in testenv

后端 未结 4 1187
甜味超标
甜味超标 2021-02-19 13:11

I am using tox for my project.

Here is my tox.ini file:

[tox]
envlist =
    py27,
    lint,
    coverage

skipsdist = True

[testenv:py27]
dep         


        
4条回答
  •  长情又很酷
    2021-02-19 13:49

    Programs that you use in commands must either be installed in tox' virtual environment or whitelisted:

    [tox]
    envlist =
        py27,
        lint,
        coverage
    
    skipsdist = True
    
    [testenv:py27]
    deps = -rrequirements.txt
    whitelist_externals = python
    commands = python -m unittest discover -s ./tests
    
    [testenv:coverage]
    whitelist_externals = coverage
    commands =
        coverage run --source=tests -m unittest discover -s tests/
        coverage html
        coverage report
    
    
    [testenv:lint]
    whitelist_externals = pylint
    commands = pylint ./foo
    

提交回复
热议问题