Tox: Switch to src/ layout?

Created on 17 May 2018  路  5Comments  路  Source: tox-dev/tox

While we are in tidy up mode: How about switching the project to src/ layout (https://github.com/pypa/python-packaging-user-guide/issues/320 - especially: https://github.com/pypa/python-packaging-user-guide/issues/320#issuecomment-389938850) - we have that kind of layout.

Apart from avoiding potential gotchas, this would make it trivial to run the tests of a checkout against a diffferent version of tox that is installed.

discussion internal

Most helpful comment

Some additional remarks on this, even when I seem to have pushed at an open door with this proposal here.

I think using this layout specifically in the context of projects using pytest and/or tox should be generally recommended. The reasoning behind this is layed out very well here in the pytest docs. Now, if you actually are pytest or tox and therefore testing yourself with yourself (how wonderfully meta is that?), this should be the obvious layout choice.

Also: the vision of tox is to support and promote good testing and packaging practices, so the way how the project itself is structured should follow its own advice.

All 5 comments

Yeah definitely this needs to happen.

Yep. Definitely a good idea.

Some additional remarks on this, even when I seem to have pushed at an open door with this proposal here.

I think using this layout specifically in the context of projects using pytest and/or tox should be generally recommended. The reasoning behind this is layed out very well here in the pytest docs. Now, if you actually are pytest or tox and therefore testing yourself with yourself (how wonderfully meta is that?), this should be the obvious layout choice.

Also: the vision of tox is to support and promote good testing and packaging practices, so the way how the project itself is structured should follow its own advice.

@obestwalter this is now fixed

Thanks @gaborbernat!

Was this page helpful?
0 / 5 - 0 ratings