Giter Site home page Giter Site logo

Comments (10)

exarkun avatar exarkun commented on June 15, 2024

It appears you are running the test suite with pytest. Instead, run it like this: python -m twisted.trial klein or tox -e py38. Feel free to re-open if the issue persists when the tests are run that way.

from klein.

dol-sen avatar dol-sen commented on June 15, 2024

Well, something has changed since I added the 21.8.0 release to our Gentoo tree. I am now getting this same test fail error on my system (gcc/glibc based) using both pytest and twisted.trial.

Could this be a change in one of the dependencies causing this?

===============================================================================
[ERROR]
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/klein/test/test_resource.py", line 642, in test_addSlash
request.setHeader.assert_has_calls(
File "/usr/lib/python3.8/unittest/mock.py", line 950, in assert_has_calls
raise AssertionError(
builtins.AssertionError: Calls not found.
Expected: [call(b'Content-Type', b'text/html; charset=utf-8'),
call(b'Content-Length', b'258'),
call(b'Location', b'http://localhost:8080/foo/')]
Actual: [call(b'Content-Type', b'text/html; charset=utf-8'),
call(b'Content-Length', b'239'),
call(b'Location', b'http://localhost:8080/foo/')]

klein.test.test_resource.KleinResourceTests.test_addSlash

Ran 242 tests in 126.510s

FAILED (errors=1, successes=241)

  • ERROR: dev-python/klein-21.8.0-r1::gentoo failed (test phase):

Installed Dependencies:
storm /etc/portage # emerge -va1 --jobs=1 klein attrs hyperlink incremental tubes twisted werkzeug zope-interface hypothesis treq

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild R ] dev-python/zope-interface-5.4.0-r2::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/attrs-22.1.0::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/hyperlink-21.0.0-r1::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/incremental-21.3.0-r1::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/werkzeug-2.2.2::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/hypothesis-6.54.4::gentoo USE="cli -test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/twisted-22.4.0-r2::gentoo USE="http2 ssl -conch -serial -test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -pypy3 -python3_11" 0 KiB
[ebuild R ] dev-python/tubes-0.2.1::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10 -python3_11" 0 KiB
[ebuild R ] dev-python/treq-22.2.0-r1::gentoo USE="-doc -test" PYTHON_TARGETS="python3_8 python3_9 python3_10" 0 KiB
[ebuild R ] dev-python/klein-21.8.0-r1::gentoo USE="-test" PYTHON_TARGETS="python3_8 python3_9 python3_10" 0 KiB

Total: 10 packages (10 reinstalls), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] n

from klein.

dol-sen avatar dol-sen commented on June 15, 2024

Also, github is not letting me re-open this bug!

from klein.

dol-sen avatar dol-sen commented on June 15, 2024

Can one of the repo admins please re-open this issue for me?

from klein.

dol-sen avatar dol-sen commented on June 15, 2024

I just ran the test suite on the installed klein pkg and am getting the same failure. So it is not a network-sandbox issue with our emerge process.

from klein.

dol-sen avatar dol-sen commented on June 15, 2024

I just re-ran tests for all those pkgs that had tests enabled in their ebuilds, plus a few of their deps, and all passed except for klein again.

from klein.

exarkun avatar exarkun commented on June 15, 2024

On NixOS with Python 3.8.13 and 3.10.5 I tried to reproduce with:

pip install zope-interface==5.4.0 attrs==22.1.0 hyperlink==21.0.0 incremental==21.3.0 werkzeug==2.2.2 hypothesis==6.54.4 twisted==22.4.0 tubes==0.2.1 treq==22.2.0 klein==21.8.0
pip install -e klein-checkout
python -m twisted.trial klein

but I wasn't able to. :/

from klein.

exarkun avatar exarkun commented on June 15, 2024

However, with Klein 21.8.0 I did reproduce the failure.

from klein.

exarkun avatar exarkun commented on June 15, 2024

It looks like this was fixed in bce8b85 (merged in 4041169 for #552).

So all that's needed now is a release.

The fix was a test-only fix, for what it's worth (the assertion about the exact content length is no longer made).

from klein.

exarkun avatar exarkun commented on June 15, 2024

This was included in 23.5.0

from klein.

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.