-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unable to avoid duplicate tests when combining addopts and positional arguments using setup.cfg #1311
Comments
we should either use a prefixed section name in the error comes from setuptools, not from py.test @hpk42 thoughts? |
Removing support from |
IMHO if we can't fix the current behavior and it is considered problematic, we should issue a pytest-warning in |
Agreed, +1 |
Using |
This is extended from #1187.
In my case there is some surprising behaviour. If I run the test suite using
addopts
fromsetup.cfg
then the tests are duplicated and detected twice. However if I run it usingaddopts
frompytest.ini
, then the problem goes away, which is very strange.After using
--debug
, I can see that the arguments are actually duplicated when usingsetup.cfg
;There are also issues with using
setup.cfg
, for example passing intestpaths
results in an error;There is a comment by a maintainer usage of
setup.cfg
should be deprecated. All of the problems mentioned above seem to go away if I usepytest.ini
, and there doesn't appear to be any clear advantage of trying to usesetup.cfg
for this.Another option is to make
[pytest]
section ofsetup.cfg
work exactly the same as if it was inpytest.ini
, but I'm not sure how feasible that is. Alternatively, dropping support for that section insetup.cfg
might be another option.Thoughts @RonnyPfannschmidt / @nicoddemus ?
The text was updated successfully, but these errors were encountered: