Test discovery failure when tests in different directories are called the same

前端 未结 4 407
旧巷少年郎
旧巷少年郎 2020-12-13 12:06

Using py.test, two tests called the same in different directory causes py.test to fail. Why is that? How can I change this without renaming all the tests?

To duplica

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 12:33

    You can add the following environment variable to your bash init file or somewhere else in your development stack to avoid these folders/files being generated in the first place

    export PYTHONDONTWRITEBYTECODE=1
    

提交回复
热议问题