pycobertura icon indicating copy to clipboard operation
pycobertura copied to clipboard

move test requirements into setup.cfg

Open gro1m opened this issue 3 years ago • 8 comments

Move tests into setup.cfg. Would also allow to pin version of pytest.

gro1m avatar Mar 26 '22 12:03 gro1m

@aconrad Do not merge before #140 is merged and this needs some merge conflict resolution, especially, the pytest-cov package must disappear (because it sets the source that caused as so much trouble).

gro1m avatar Apr 18 '22 09:04 gro1m

Do we still need/want this PR @gro1m?

aconrad avatar Apr 18 '22 21:04 aconrad

Isn't the industry standard to use test-requirements.txt? What motivates this change?

aconrad avatar Apr 18 '22 21:04 aconrad

See the discussion here (there are preferences for either, but maybe it can help you form an opinion on this): https://discuss.python.org/t/is-it-preferable-to-add-test-dependensies-as-an-extra-require-instead-of-tox-ini/4984.

gro1m avatar Apr 18 '22 21:04 gro1m

Typing pip install -e .[test] feels a little more cryptic to me, but it's likely just about habit. But I haven't worked professionally with Python for a couple of years and if that's how people like to do it nowadays, then fine by me.

aconrad avatar Apr 18 '22 22:04 aconrad

The PR description says that it would "allow to pin version of pytest". Why was that not already the case with test-requirements.txt?

aconrad avatar Apr 18 '22 22:04 aconrad

The PR description says that it would "allow to pin version of pytest". Why was that not already the case with test-requirements.txt?

I am not sure why I put that. At the time, I thought that would be a particular advantage, but it is also possible with test-requirements.txt, as I did in my last PR.

gro1m avatar Apr 19 '22 09:04 gro1m

But I think the discussion is more if you want to keep the test requirements external to the package or not. And what is nicer with the setup.cfg is that you do not explicitly specify the current package with a . (i.e. pycobertura itself)

gro1m avatar Apr 19 '22 09:04 gro1m