Closed 0-wiz-0 closed 2 weeks ago
It sounds like you're running the tests in a custom way. The server tests are likely sensitive to the current directory and sys.path
, so if things are out of place they may not start correctly. Note that they also start servers listening on random high ports bound to the local interface, so that needs to be available in your environment. I ran the build and tests from sdist for version 3.1.3 in the following way:
# get the 3.1.3 sdist from pypi
$ curl -O https://files.pythonhosted.org/packages/9f/69/83029f1f6300c5fb2471d621ab06f6ec6b3324685a2ce0f9777fd4a8b71e/werkzeug-3.1.3.tar.gz
$ tar xf werkzeug-3.1.3.tar.gz
$ cd werkzeug-3.1.3
# create a virtualenv
$ python3.13 -m venv .venv
$ . .venv/bin/activate
# install the build and test requirements
$ pip install -r requirements/build.txt -r requirements/tests.txt
# build and install the wheel
$ python -m build
$ pip install dist/werkzeug-3.1.3-py3-none-any.whl
# run pytest
$ pytest
All tests pass successfully.
I've been updating the werkzeug package for pkgsrc. Starting with 3.1.0 (still there in 3.1.3) I see a test hang in
test_serving.py
. If I remove the file, most other tests pass except forI'm using the pypi source distfile, and run the tests after building and installing werkzeug by running
pytest
in the build directory. The output looks like this:and then nothing happens.
Can you please advise how to debug/fix this? Thanks.
Environment: