Hi Mikel.

It might look like simple bump but you are upgrading from 4.1.1 to 6.0.0 and there are some breaking changes between those releases.

The error message looks like the plugin is loaded twice for some reason and the second try to register the same CLI option fails. %pytest macro sets PYTHONPATH so it's possible that the plugin is first loaded from buildroot and then from the current working directory or vice-versa. I also see some settings for pytest in pyproject.toml you might want to take a look.

Have a nice day.

Lumír

On 4/3/24 15:55, Mikel Olasagasti wrote:
Hi all,

I'm trying to update python-pytest-postgresql (simple bump) and during
the %check phase I find the following error:

+ /usr/bin/pytest --postgresql-exec=/usr/bin/pg_ctl -k 'not docker' --no-cov
(...)
   File 
"/builddir/build/BUILDROOT/python-pytest-postgresql-6.0.0-1.fc41.x86_64/usr/lib/python3.12/site-packages/pytest_postgresql/plugin.py",
line 67, in pytest_addoption
     parser.addoption(
   File "/usr/lib/python3.12/site-packages/_pytest/config/argparsing.py",
line 104, in addoption
     self._anonymous.addoption(*opts, **attrs)
   File "/usr/lib/python3.12/site-packages/_pytest/config/argparsing.py",
line 385, in addoption
     raise ValueError("option names %s already added" % conflict)
ValueError: option names {'--postgresql-exec'} already added

What I found is that once the postgresql plugin is loaded it conflicts
with the tests of the module.

Any advice on how to solve this issue?

Best regards,
Mikel
--
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue
--
_______________________________________________
python-devel mailing list -- python-devel@lists.fedoraproject.org
To unsubscribe send an email to python-devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/python-devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to