[docs] [issue24247] "unittest discover" modifies sys.path

Robert Collins report at bugs.python.org
Fri Aug 21 03:41:34 CEST 2015


Robert Collins added the comment:

It did that because you did not specify a top level directory. Without that, the cwd is not on the path and that breaks many environments.

We should probably document it better. The workaround for your needs is to either just run 'unittest discover', or run 'unittest discover tests -t .', not 'unittest discover tests'.

The behaviour is however something I believe to be correct and essential to most user experiences.

----------
assignee:  -> docs at python
components: +Documentation
nosy: +docs at python
stage:  -> needs patch
title: "unittest discover" does modify sys.path -> "unittest discover" modifies sys.path

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24247>
_______________________________________


More information about the docs mailing list