r/programming • • Nov 03 '19

Why you should use `python -m pip`

https://snarky.ca/why-you-should-use-python-m-pip/
0 Upvotes

13 comments sorted by

View all comments

Show parent comments

4

u/[deleted] Nov 03 '19

Can you please elaborate on that bit about tests in project root? Not sure I understand what you mean by that. Thx.

3

u/cyanrave Nov 04 '19 edited Nov 04 '19

People consistently plop a folder called 'tests' right next to the package they'd like to test... which is code that describes the expected behavior of the code next door.

I believe it may be the single biggest mistake that people are bringing forward into py3 when they migrate. Subpackaging and implicit name spacing are alive and well in py3 and people still habitually go towards what the the pytest docs says 'because it is pytest'.

Shortly into Okken's modern book on the pytest framework, he clears up this sorry note that exists in the 'official docs', clearly formulating why using subpackaging has organizational advantages.

2

u/[deleted] Nov 04 '19

Ok, will have to revisit Okken's book. Still not sure I understand what organizational paradigm you propose to use.

2

u/cyanrave Nov 04 '19

When I get to work, I'll see if I can rip a quote from him on it.