小编Ham*_*005的帖子

Tox 失败,因为 setup.py 找不到 requirements.txt

我在我的项目中添加了 tox,我的tox.ini很简单:

[tox]
envlist = py37

[testenv]
deps = 
    -r{toxinidir}/requirements_test.txt
commands = 
    pytest -v
Run Code Online (Sandbox Code Playgroud)

但是当我运行时tox,出现以下错误:

[tox]
envlist = py37

[testenv]
deps = 
    -r{toxinidir}/requirements_test.txt
commands = 
    pytest -v
Run Code Online (Sandbox Code Playgroud)

这是我的setup.py

ERROR: invocation failed (exit code 1), logfile: /path/to/my_project/.tox/py37/log/py37-2.log
========================================================================================= log start ==========================================================================================
Processing ./.tox/.tmp/package/1/my_project-0+untagged.30.g6909bfa.dirty.zip
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-req-build-ywna_4ks/setup.py", line 15, in <module>
        with open(requirements_path) as requirements_file:
    FileNotFoundError: [Errno 2] No …
Run Code Online (Sandbox Code Playgroud)

python testing setup.py python-3.x tox

6
推荐指数
1
解决办法
2549
查看次数

标签 统计

python ×1

python-3.x ×1

setup.py ×1

testing ×1

tox ×1