Package Details: python-pytest-httpserver 1.0.0-2

Git Clone URL: https://aur.archlinux.org/python-pytest-httpserver.git (read-only, click to copy)
Package Base: python-pytest-httpserver
Description: Pytest plugin for testing http clients without contacting the real http server
Upstream URL: https://github.com/csernazs/pytest-httpserver/
Licenses: MIT
Conflicts: python-pytest-localserver
Submitter: dbermond
Maintainer: dbermond
Last Packager: dbermond
Votes: 2
Popularity: 0.76
First Submitted: 2020-06-28 17:20
Last Updated: 2021-07-19 18:03

Latest Comments

whynothugo commented on 2021-07-19 18:36

Thanks!

dbermond commented on 2021-07-19 18:05

@whynothugo @serxxx I have add a conflicts entry for python-pytest-localserver.

serxxx commented on 2021-07-19 09:22

@whynothugo I second this. Every unit test in python-pytest-httpserver fails if python-pytest-localserver is installed; they pass if localserver is removed first.

vdirsyncer-git depends on this package, which means if localserver is installed, vdirsyncer can't be until python-pytest-localserver is removed.

whynothugo commented on 2021-07-04 12:08

python-torf does not pass for me if python-pytest-localserver is installed

Both pytest plugins provide fixtures with the same name httpserver, so one will always override the other.

I've no idea why (or how) it worked for you. Maybe which plugin shadows the other is not fully deterministic? The reality is, having both installed at the same times mean that one is always broken (hence my suggestion to mark them as conflicting).

Here's my output running makepkg for `python-torf:

=========================================================== short test summary info ===========================================================
FAILED tests/test_utils.py::test_download_from_connectable_url - AttributeError: 'ContentServer' object has no attribute 'expect_request'
FAILED tests/test_magnet.py::test_getting_info__xs_succeeds__as_fails - AttributeError: 'ContentServer' object has no attribute 'url_for'
FAILED tests/test_magnet.py::test_getting_info__xs_fails__as_succeeds - AttributeError: 'ContentServer' object has no attribute 'expect_requ...
FAILED tests/test_magnet.py::test_getting_info__xs_returns_invalid_bytes - AttributeError: 'ContentServer' object has no attribute 'url_for'
FAILED tests/test_magnet.py::test_getting_info__as_returns_invalid_bytes - AttributeError: 'ContentServer' object has no attribute 'url_for'
FAILED tests/test_magnet.py::test_getting_info__xs_times_out - AssertionError: assert [call(Connect...rent: Nope'))] == [call(Compara... Tim...
FAILED tests/test_magnet.py::test_getting_info_from_ws - AttributeError: 'ContentServer' object has no attribute 'url_for'
FAILED tests/test_magnet.py::test_getting_info_from_tr - AttributeError: 'ContentServer' object has no attribute 'url_for'
======================================================== 8 failed, 375 passed in 5.73s ========================================================
==> ERROR: A failure occurred in check().
    Aborting...

Removing python-pytest-localserver made check() pass and the package build successfully.

dbermond commented on 2021-07-04 11:40

@whynothugo python-torf tests works fine when both are installed.

whynothugo commented on 2021-07-04 09:52

They both provide a fixture with the same name.

Installing python-pytest-localserver package makes tests that use this package fail.

Do you have any examples of ones that DON'T fail?

dbermond commented on 2021-07-04 02:49

@whynothugo I don't see any conflict between this package and python-pytest-localserver, since they can be installed together and they also work fine when both are installed. Yes, this package fails to build when python-pytest-localserver is installed, but this is not a matter of a conflicts entry on the PKGBUILD. To overcome this, you need to build the package in a clean chroot with devtools.

whynothugo commented on 2021-07-02 11:24

This package conflicts with python-pytest-localserver.

Tests for this package, and tests of packages that depend on it fail if python-pytest-localserver is locally installed.