Giter VIP home page Giter VIP logo

Comments (15)

csernazs avatar csernazs commented on August 29, 2024 2

@mtelka @dbermond

Version 1.0.12 just has been released with the fix to pypi. I checked it on my host and I could ran the sdist tests with the pytest-httpserver installed from wheel to the venv.
So I hope it will be fixed for you as well. If not, feel free to re-open this issue.

I'll also to a RCA later on as this was totally unexpected.

Thanks for the report!
Zsolt

from pytest-httpserver.

mtelka avatar mtelka commented on August 29, 2024 2

All tests pass for me with version 1.0.12 sdist. Thank you!

from pytest-httpserver.

dbermond avatar dbermond commented on August 29, 2024 2

I also can confirm that tests are passing fine in version 1.0.12 in Arch Linux.

Thank for the assistance and for fixing this!

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024 1

I pushed a fix to the fix-345 branch, could you please re-run the test on it?

This should fix both errors you reported.

@csernazs Using branch fix-345 with the new commits added today fixes both issues for me.

Thank you for fixing this.

Do you intend to release a new version with the fixes or will it stay only in git master for the time being?

Thanks!

Yes, I want to release a view version with the fix as it is included in sdist, and the tests don't work with the released wheel.

I'll update the ticket when it is ready.

Zsolt

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

Thanks for the report!

I spot two issues there.

First:

  - Accept-Encoding: gzip, deflate
  +   Accept-Encoding: gzip, deflate, br, zstd

It is likely you had ztsd or zstandard packages installed and requests (urllib3 to be more exact) picked up these, and then specified these Accept-Encoding headers. I can try workaround this in the tests, so it won't be dynamic.
I could re-produce this by installing urllib3[zstd].

The 2nd is more interesting, your test run has a 2-space prefix for each of the messages.

For example:

  - Expected request: <RequestMatcher uri='/foo' method='POST' query_string=None headers={} data=None json={'foo': 'bar'}>
  +   Expected request: <RequestMatcher uri='/foo' method='POST' query_string=None headers={} data=None json={'foo': 'bar'}>
  ? ++
  - Found 1 similar request(s):
  +   Found 1 similar request(s):

While the acutal error string is constructed like this:

if similar_requests:
assert_msg_lines.append(f"Found {len(similar_requests)} similar request(s):")
for request in similar_requests:
assert_msg_lines.extend(
(
"--- Similar Request Start",
f"Path: {request.path}",
f"Method: {request.method}",
f"Body: {request.get_data()!r}",
f"Headers: {request.headers}",
f"Query String: {request.query_string.decode('utf-8')!r}",
"--- Similar Request End",
)
)
else:
assert_msg_lines.append("No similar requests found.")
assert_msg = "\n".join(assert_msg_lines) + "\n"
assert matching_count == count, assert_msg

And the expected string in the test constructed like this (this seems to be ok in your test):

expected_message = f"""Matching request found 0 times but expected 1 times.
Expected request: <RequestMatcher uri='/foo' method='POST' query_string=None headers={{}} data=None json={{'foo': 'bar'}}>
Found 1 similar request(s):
--- Similar Request Start
Path: /foo
Method: GET
Body: b''
Headers: Host: localhost:{httpserver.port}\r
User-Agent: requests\r
Accept-Encoding: gzip, deflate\r
Accept: */*\r
Connection: keep-alive\r
\r
Query String: ''
--- Similar Request End
""" # noqa: E501
assert str(err.value) == expected_message

Based on the repr() shown by pylint this is 2 spaces and atm I have no ide where those prefixes came from.

Which python version are you using?
Which system?

Zsolt

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

Could you please try running the test on the branch where I pushed the fix?

I still have no clue about the 2-spaces prefix.
Could you please check if the test file is intact? Eg. you could try to run the tests on the cloned repo.
I compared the files in git vs the sdist and these are identical.

Thanks,
Zsolt

from pytest-httpserver.

mtelka avatar mtelka commented on August 29, 2024

First:

  - Accept-Encoding: gzip, deflate
  +   Accept-Encoding: gzip, deflate, br, zstd

It is likely you had ztsd or zstandard packages installed and requests (urllib3 to be more exact) picked up these, and then specified these Accept-Encoding headers. I can try workaround this in the tests, so it won't be dynamic. I could re-produce this by installing urllib3[zstd].

Actually, I do have both ztsd and zstandard. I tried to re-run tests (from the sdist) with both ztsd and zstandard uninstalled and I see this:

E         - Accept-Encoding: gzip, deflate
E         +   Accept-Encoding: gzip, deflate, br
E         ? ++                              ++++

from pytest-httpserver.

mtelka avatar mtelka commented on August 29, 2024

Which python version are you using?

3.9.19

Which system?

OpenIndiana

from pytest-httpserver.

dbermond avatar dbermond commented on August 29, 2024

Could you please try running the test on the branch where I pushed the fix?

This does not fix the issue for me. Python 3.12.4 in Arch Linux.

from pytest-httpserver.

mtelka avatar mtelka commented on August 29, 2024

Could you please try running the test on the branch where I pushed the fix?

I tried to run test on the fix-345 branch and I no longer see difference in the Accept-Encoding: (even with both ztsd and zstandard installed). The br difference is gone as well. I only see the 2-space issue.

I still have no clue about the 2-spaces prefix. Could you please check if the test file is intact? Eg. you could try to run the tests on the cloned repo. I compared the files in git vs the sdist and these are identical.

After the test run the git status command shows no difference.

BTW, I use this command to run tests: env - PYTHONPATH=. PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 PYTEST_PLUGINS="pytest_httpserver" pytest -vv --color=no and I do have many python modules installed:

$ pip freeze
aiohttp==3.9.3
aiosignal==1.3.1
alabaster==0.7.16
aniso8601==9.0.1
annotated-types==0.7.0
ansi2html==1.9.2
ansible==8.7.0
ansible-core==2.15.12
anyio==4.2.0
apeye==1.4.1
apeye-core==1.1.5
appdirs==1.4.4
argcomplete==3.4.0
argh==0.31.3
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
asgiref==3.8.1
asn1crypto==1.5.1
assertpy==1.1
astor==0.8.1
astroid==3.2.3
asttokens==2.4.1
async-generator==1.10
async-timeout==4.0.3
atomicwrites==1.4.1
attrs==23.2.0
autocommand==2.2.2
Automat==22.10.0
autopage==0.5.2
autopep8==2.3.1
Babel==2.15.0
backcall==0.2.0
backports.entry-points-selectable==1.3.0
backports.tarfile==1.2.0
barman==3.10.1
bcrypt==4.1.3
beautifulsoup4==4.12.3
betamax==0.9.0
black==24.4.2
bleach==6.1.0
blessings==1.7
blinker==1.8.2
borgbackup==1.4.0
bottle==0.12.25
bracex==2.4
Brotli==1.1.0
brotlicffi==1.1.0.0
BTrees==6.0
build==1.2.1
CacheControl==0.14.0
cached-property==1.5.2
cachetools==5.4.0
calver==2022.6.26
cattrs==23.2.3
ccsm==0.8.18
certifi==2024.7.4
cffi==1.16.0
cfgv==3.4.0
Chameleon==4.5.4
characteristic==14.3.0
chardet==5.2.0
charset-normalizer==3.3.2
check-manifest==0.49
cheroot==10.0.1
CherryPy==18.10.0
chevron==0.14.0
CJKwrap==2.2
cleo==2.1.0
click==8.1.7
click-help-colors==0.9.4
cliff==4.7.0
cloudpickle==3.0.0
cmarkgfm==2024.1.14
cmd2==2.4.3
codecov==2.1.13
codespell==2.3.0
coincidence==0.6.6
colorama==0.4.6
colorlog==6.8.2
configobj==5.0.8
ConfigUpdater==3.2
consolekit==1.7.0
constantly==23.10.4
contextlib2==21.6.0
contextvars==2.4
covdefaults==2.3.0
coverage==7.6.0
coverage-enable-subprocess==1.0
coveralls==4.0.1
crashtest==0.4.1
crmsh==4.5.0
cryptography==42.0.8
cryptography_vectors==42.0.8
cssselect==1.2.0
cupshelpers==1.0
curio==1.6
Cython==3.0.10
cython-test-exception-raiser==1.0.2
dbus-python==1.3.2
ddt==1.7.2
decorator==5.1.1
defusedxml==0.7.1
deprecation==2.1.0
deprecation-alias==0.3.3
detect-test-pollution==1.2.0
diff_cover==9.1.0
dill==0.3.8
dirty-equals==0.7.1.post0
dist-meta==0.8.1
distlib==0.3.8
distro==1.9.0
dnspython==2.6.1
docopt==0.6.2
docutils==0.21.2
dogpile.cache==1.3.3
dom_toml==2.0.0
domdf_python_tools==3.9.0
dulwich==0.22.1
dunamai==1.21.2
editables==0.5
elastic-transport==8.13.1
elasticsearch==8.14.0
elementpath==4.4.0
email_validator==2.2.0
ephemeral-port-reserve==1.1.4
eval_type_backport==0.2.0
exceptiongroup==1.2.2
execnet==2.1.1
executing==2.0.1
expandvars==0.12.0
extras==1.0.0
factory-boy==3.3.0
fail2ban==1.0.2
Faker==26.0.0
fastjsonschema==2.19.1
fields==5.0.0
filelock==3.15.4
findpython==0.6.1
fixtures==4.1.0
flake8==7.1.0
flake8-2020==1.8.1
flake8-bugbear==24.4.26
flake8-docstrings==1.7.0
flake8-noqa==1.4.0
flake8-typing-imports==1.15.0
flaky==3.8.1
flamegraph==0.1
Flask==3.0.3
flex==6.14.1
flit_core==3.9.0
flit_scm==1.7.0
flufl.flake8==0.10
freezegun==1.5.1
frozendict==2.4.4
frozenlist==1.4.1
fs==2.4.16
func-timeout==4.3.5
future==1.0.0
gevent==24.2.1
ghp-import==2.1.0
gi-docgen==2024.1
gitdb==4.0.11
GitPython==3.1.43
gprof2dot==2024.6.6
graphviz==0.20.3
greenlet==3.0.3
gunicorn==22.0.0
h11==0.14.0
h2==4.1.0
handy-archives==0.2.0
hatch-fancy-pypi-readme==24.1.0
hatch-nodejs-version==0.3.2
hatch-requirements-txt==0.4.1
hatch-vcs==0.4.0
hatchling==1.25.0
housekeeping==1.1
hpack==4.0.0
http-parser==0.9.0
httpcore==1.0.5
httplib2==0.22.0
httpx==0.27.0
humanize==4.9.0
hupper==1.12.1
hyperframe==6.0.1
hyperlink==21.0.0
hypothesis==6.108.2
icecream==2.1.3
identify==2.6.0
idna==3.7
imagesize==1.4.1
immutables==0.20
importcheck==0.5.0
importlib_metadata==8.0.0
importlib_resources==6.4.0
incremental==22.10.0
inflect==7.3.1
ini2toml==0.15
iniconfig==2.0.0
installer==0.7.0
invocations==3.3.0
invoke==2.2.0
iocapture==0.1.2
ipdb==0.13.13
ipython==8.18.1
iso8601==2.1.0
isort==5.13.2
itsdangerous==2.2.0
jaraco.classes==3.4.0
jaraco.collections==5.0.1
jaraco.context==5.3.0
jaraco.develop==8.15.0
jaraco.env==1.0.0
jaraco.envs==2.6.0
jaraco.functools==4.0.1
jaraco.itertools==6.4.1
jaraco.packaging==10.2.2
jaraco.path==3.7.0
jaraco.test==5.4.0
jaraco.text==3.14.0
jaraco.ui==2.3.0
jaraco.vcs==2.2.0
jaraco.versioning==1.1.0
jedi==0.19.1
Jinja2==3.1.4
jmespath==1.0.1
jsonpointer==3.0.0
jsonrpclib-pelix==0.4.3.3
jsonschema==4.23.0
jsonschema-specifications==2023.12.1
jupyter_core==5.7.2
keyring==25.2.1
keyrings.alt==5.0.1
kgb==7.1.1
lazy==1.6
lazy-object-proxy==1.10.0
libcst==1.4.0
lingua==4.15.0
linkify-it-py==2.0.3
littleutils==0.2.2
looseversion==1.3.0
louis==3.30.0
lxml==5.2.2
lxml-stubs==0.5.1
lxml_html_clean==0.1.1
maison==1.4.3
Mako==1.3.5
manuel==1.12.4
Markdown==3.6
markdown-it-py==3.0.0
markdown2==2.5.0
MarkupSafe==2.1.5
marshmallow==3.21.3
matplotlib-inline==0.1.7
maturin==1.7.0
mccabe==0.7.0
mdurl==0.1.2
mercurial==5.9.3
mergedeep==1.3.4
meson==1.4.1
mistletoe==1.4.0
mistune==3.0.2
mkdocs==1.6.0
mkdocs-bootstrap==1.1.1
mkdocs-bootswatch==1.1
mkdocs-get-deps==0.2.0
mock==5.1.0
more-itertools==10.3.0
msgpack==1.0.8
multidict==6.0.5
mutagen==1.47.0
mypy==1.11.0
mypy-extensions==1.0.0
mysqlclient==2.2.4
natsort==8.4.0
nbformat==5.10.4
netsnmp-python==1.0a1
nh3==0.2.18
nose==1.3.7
notify2==0.3.1
nox==2024.4.15
numpy==1.26.4
objgraph==3.6.1
olefile==0.47
outcome==1.3.0.post0
packaging==24.1
parameterized==0.8.1
paramiko==3.4.0
parso==0.8.4
passlib==1.7.4
Paste==3.10.1
PasteDeploy==3.1.0
path==16.14.0
path.py==12.5.0
pathlib2==2.3.7.post1
pathspec==0.12.1
pbr==6.0.0
pdm-backend==2.3.3
pep440==0.1.2
persistent==6.0
pexpect==4.9.0
pickleshare==0.7.5
pillow==10.4.0
pip-run==13.0.0
pipdeptree==2.23.1
pipenv==2024.0.1
pkg==0.1
pkgconfig==1.5.5
pkginfo==1.11.1
pkgutil_resolve_name==1.3.10
plaster==1.1.2
plaster-pastedeploy==1.0.1
platformdirs==4.2.2
pluggy==1.5.0
ply==3.11
poetry-core==1.9.0
poetry-dynamic-versioning==1.4.0
polib==1.2.0
portend==3.2.0
powerline-status==2.8.3
pretend==1.0.9
prettytable==3.10.2
process-tests==3.0.0
prompt_toolkit==3.0.47
psutil==6.0.0
psycopg2==2.9.9
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0
py-cpuinfo==9.0.0
py3c==1.4
pyasn1==0.6.0
pyasn1_modules==0.4.0
pybind11==2.13.1
pybonjour==1.1.1
pycairo==1.26.1
pycmd==1.2
pycodestyle==2.12.0
PyContracts==2.0.1
pycparser==2.22
pycryptodome==3.20.0
pycryptodome-test-vectors==1.0.16
pycryptodomex==3.20.0
pycups==2.0.4
pycurl==7.45.3
pydantic==2.8.2
pydantic_core==2.20.1
pydiff==0.2
pydiffx==1.1
pydocstyle==6.3.0
pyfakefs==5.6.0
pyflakes==3.2.0
pyftpdlib==1.5.10
Pygments==2.18.0
PyGObject==3.46.0
PyHamcrest==2.1.0
PyJWT==2.8.0
pylint==3.2.5
pymongo==4.8.0
PyNaCl==1.5.0
PyNUTClient==2.8.2
pyOpenSSL==24.1.0
pyparsing==3.1.2
pyperclip==1.9.0
pyproject-api==1.7.1
pyproject-examples==2023.6.30
pyproject-fmt==2.1.4
pyproject-fmt-rust==1.1.5
pyproject-installer==0.5.4
pyproject-metadata==0.8.0
pyproject-parser==0.11.1
pyproject_hooks==1.0.0
PyQt-builder==1.16.4
PyQt5==5.15.11
PyQt5_sip==12.15.0
pyramid==2.0.1
pyroma==4.2
pyrsistent==0.20.0
PySocks==1.7.1
pytest==8.2.2
pytest-asyncio==0.23.6
pytest-benchmark==4.0.0
pytest-black==0.3.12
pytest-check==2.3.1
pytest-checkdocs==2.13.0
pytest-console-scripts==1.4.1
pytest-cov==5.0.0
pytest-custom-exit-code==0.3.0
pytest-datadir==1.5.0
pytest-enabler==3.1.1
pytest-env==1.1.3
pytest-expect==1.1.0
pytest-fixture-config==1.7.0
pytest-flake8==1.1.1
pytest-forked==1.6.0
pytest-helpers-namespace==2021.12.29
pytest-home==0.5.1
pytest-ignore-flaky==2.2.1
pytest-lazy-fixtures==1.1.0
pytest-metadata==3.1.1
pytest-mock==3.14.0
pytest-mypy==0.10.3
pytest-mypy-plugins==3.1.2
pytest-perf==0.15.0
pytest-randomly==3.15.0
pytest-regressions==2.5.0
pytest-relaxed==2.0.2
pytest-reporter==0.5.3
pytest-rerunfailures==14.0
pytest-salt-factories==1.0.1
pytest-shell-utilities==1.9.0
pytest-skip-markers==1.5.1
pytest-socket==0.7.0
pytest-subprocess==1.5.0
pytest-subtests==0.13.1
pytest-system-statistics==1.0.2
pytest-timeout==2.3.1
pytest-travis-fold==1.3.0
pytest-xdist==3.6.1
pytest-xprocess==0.23.0
pytest_freezer==0.4.8
pytest_httpserver==1.0.11
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-magic==0.4.27
python-rapidjson==1.18
python-subunit==1.4.4
python-xlib==0.33
pytidylib==0.3.2
pytoml==0.1.21
pytoolconfig==1.3.1
pytz==2024.1
pyxdg==0.28
PyYAML==6.0.1
pyyaml_env_tag==0.1
pyzmq==26.0.3
qualname==0.1.0
railroad-diagrams==3.0.1
rapidfuzz==3.9.3
RBTools==5.0
rdiff-backup==2.2.6
re-assert==1.1.0
readme_renderer==44.0
readthedocs-sphinx-ext==2.2.5
redis==5.0.7
referencing==0.35.1
regex==2024.5.15
releases==2.1.1
repoze.lru==0.7
repoze.sphinx.autointerface==1.0.0
requests==2.32.3
requests-file==2.1.0
requests-toolbelt==1.0.0
requests-wsgi-adapter==0.4.1
resolvelib==1.0.1
rfc3986==2.0.0
rfc3987==1.3.8
rich==13.7.1
Routes==2.5.1
rpds-py==0.19.0
rrdtool==0.1.10
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
ruyaml==0.91.0
salt==3007.1
schema==0.7.7
scikit-build==0.18.0
scikit_build_core==0.9.8
SCons==4.8.0
scour==0.38.2
scripttest==1.3
sdjson==0.5.0
seedir==0.5.0
semantic-version==2.10.0
serpent==1.41
service-identity==24.1.0
setuptools-declarative-requirements==1.3.0
setuptools-rust==1.9.0
setuptools-scm==8.1.0
sh==1.14.3
shellingham==1.5.4
shippinglabel==2.0.0
simplegeneric==0.8.1
simplejson==3.19.2
singledispatch==4.1.0
sip==6.8.6
six==1.16.0
smartypants==2.0.1
smmap==5.0.1
sniffio==1.3.1
snowballstemmer==2.2.0
socksio==1.0.0
sortedcontainers==2.4.0
soupsieve==2.5
spec==1.4.1
Sphinx==7.4.6
sphinx-autodoc-typehints==2.2.3
sphinx-issues==4.1.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.8
sphinxcontrib-devhelp==1.0.6
sphinxcontrib-htmlhelp==2.0.5
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.7
sphinxcontrib-serializinghtml==1.1.10
sphobjinv==2.3.1.1
sqlparse==0.5.1
stack-data==0.6.3
stdio-mgr==1.0.1
stestr==4.1.0
stevedore==5.2.0
strict-rfc3339==0.7
strictyaml==1.7.3
subprocess-tee==0.4.2
sure==2.0.1
sybil==6.1.1
tabulate==0.9.0
teamcity-messages==1.32
tempora==5.6.0
termcolor==2.4.0
terminator==2.1.1
termstyle==0.1.11
testfixtures==8.3.0
testpath==0.6.0
testresources==2.0.1
testscenarios==0.5.0
testtools==2.7.2
texttable==1.7.0
time-machine==2.14.2
tokenize-rt==5.2.0
toml==0.10.2
tomli==2.0.1
tomli_w==1.0.0
tomlkit==0.13.0
tornado==6.4.1
tox==4.16.0
tox-current-env==0.0.11
tqdm==4.66.4
traitlets==5.14.3
transaction==4.0
translationstring==1.4
trove-classifiers==2024.7.2
trustme==1.1.0
twine==5.1.1
Twisted==24.3.0
typeguard==4.3.0
types-decorator==5.1.8.20240310
types-docutils==0.21.0.20240711
types-mock==5.1.0.20240425
types-paramiko==3.4.0.20240423
types-psutil==6.0.0.20240621
types-python-dateutil==2.9.0.20240316
types-pytz==2024.1.0.20240417
types-PyYAML==6.0.12.20240311
types-requests==2.32.0.20240712
types-setuptools==70.3.0.20240710
types-six==1.16.21.20240513
types-toml==0.10.8.20240310
typing-inspect==0.9.0
typing_extensions==4.12.2
typogrify==2.0.7
tzdata==2024.1
u-msgpack-python==2.8.0
uc-micro-py==1.0.3
ukkonen==1.0.1
UkPostcodeParser==1.1.2
unearth==0.16.1
Unidecode==1.3.8
urllib3==2.1.0
uvicorn==0.30.1
validate-email==1.3
validate-pyproject==0.16
validators==0.33.0
venusian==3.1.0
versioneer==0.29
virtualenv==20.26.3
voluptuous==0.15.2
waitress==3.0.0
watchdog==4.0.1
wcag-contrast-ratio==0.9
wcmatch==8.5.2
wcwidth==0.2.13
webencodings==0.5.1
WebOb==1.8.7
websockets==12.0
WebTest==3.0.0
Werkzeug==3.0.3
whey==0.1.1
wrapt==1.16.0
WSGIProxy2==0.5.1
xmlschema==3.3.1
xmltodict==0.13.0
yamlfix==1.16.0
yamllint==1.35.1
yarl==1.9.4
youtube-dl==2021.12.17
yt-dlp==2024.7.16
zc.lockfile==3.0.post1
ZConfig==4.1
zest.releaser==9.2.0
zipp==3.19.2
ZODB==6.0
zodbpickle==4.0
zope.component==6.0
zope.configuration==5.0.1
zope.copy==4.3
zope.deferredimport==5.0
zope.deprecation==5.0
zope.event==5.0
zope.exceptions==5.1
zope.hookable==6.0
zope.i18nmessageid==6.1.0
zope.interface==6.4.post2
zope.location==5.0
zope.proxy==5.2
zope.schema==7.0.1
zope.security==7.0
zope.testing==5.0.1
zope.testrunner==6.4
zstandard==0.23.0
zstd==1.5.5.1
$

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

@mtelka
Just FYI: br was likely added by the brotli package. Each additional encoding has its corresponding compression python package.

@dbermond
Could you please share more details why the tests failed for you still on this branch?
Is this because of the 2-space prefix issue or the headers or both?
CI runs tests on python 3.12, so on my side it went well.

To both of you:

The project provides a poetry.lock, so all the CI and the developers run the tests in a venv where only those packages are installed. You can create the venv by running make dev and then start the tests by make tests. Could you try doing it?

I could reproduce the 2-space issue by installing a lots of pytest plugins so we need to bisect which pytest plugin causes this, just to have an RCA.

Zsolt

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

hi all (@dbermond , @mtelka ),

I pushed a fix to the fix-345 branch, could you please re-run the test on it?

This should fix both errors you reported.

Zsolt

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

Quick update:

I could reproduce this by installing pytest-httpserver from wheel to a virtualenv, then running the tests on the contents of the sdist tarball. This is exactly what you described, but I could't believe this is different from running tests from the sources cloned from github (where the test passes), sorry for that.

So it seems not the additional packages cause the issue but the installation method somehow causes this..

But my fix should solve it so I'm waiting for a feedback from you before I merge the fix.

Zsolt

from pytest-httpserver.

csernazs avatar csernazs commented on August 29, 2024

This is where pytest sets the 2-space prefix:

https://github.com/pytest-dev/pytest/blob/3433ba4fa4d2b971f762628f98c88cc426417226/src/_pytest/assertion/util.py#L105-L108

from pytest-httpserver.

dbermond avatar dbermond commented on August 29, 2024

I pushed a fix to the fix-345 branch, could you please re-run the test on it?

This should fix both errors you reported.

@csernazs Using branch fix-345 with the new commits added today fixes both issues for me.

Thank you for fixing this.

Do you intend to release a new version with the fixes or will it stay only in git master for the time being?

from pytest-httpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.