coverage.py does not cover script if py.test executes it from another directory

前端 未结 4 1504
眼角桃花
眼角桃花 2020-12-25 12:23

I got a python script which takes command line arguments, working with some files. I\'m writing succeeding tests with py.test putting this script through its pa

4条回答
  •  长发绾君心
    2020-12-25 12:52

    Another option with tox is to set the PYTHONPATH in tox.ini:

    [testenv] setenv = PYTHONPATH = {toxinidir} commands = pytest --cov= - codecov

提交回复
热议问题