======= twisted ======= --------------- Full test suite --------------- stretch: The package ships `DEP-8 `_ tests that run the test suite with Python 2 and 3, see `autopkgtest `_. Some Unicode tests fails with Python 2 when ran through autopkgtest. Manually / fine-grained: :: apt install tox cd twisted-16.6.0/ chown -R nonroot: . # cf. README.rst su nonroot -c 'tox -e py27-tests' apt install python-twisted-core python3-twisted su nonroot -c 'PYTHONPATH=src/ trial twisted' # python2 su nonroot -c 'PYTHONPATH=src/ trial3 twisted' # python3 su nonroot -c 'PYTHONPATH=src/ trial twisted.web' su nonroot -c 'PYTHONPATH=src/ trial twisted.web.test.test_http' su nonroot -c 'PYTHONPATH=src/ trial twisted.web.test.test_http.ParsingTests' # DEP-8 tests do a variant like this, not suitable for source testing: su nonroot -c 'python -m twisted.trial ./twisted/web/test/test_agent.py' su nonroot -c 'python3 -m twisted.trial ./twisted/web/test/test_agent.py' # Note: requires a twisted to be already installed system-wide # Note: if in src/ some issue with catching warnings occurs and some tests fail # Note: if not in src/ py3+twisted.trial will use the twisted from /usr/lib/ jessie: :: cd twisted-14.0.2/ # cf. README chown -R nonroot: . su nonroot -c 'bin/trial twisted' su nonroot -c 'bin/trial twisted.web' su nonroot -c 'bin/trial twisted.web.test.test_http' su nonroot -c 'bin/trial twisted.web.test.test_http.ParsingTestCase' There are dozens of errors in the test suite. Among others, this stalls/timeouts during SSL tests AFAICS. Still it's useful to test modules changes by the recent patches. ---------- Smoke test ---------- twisted-web: :: twistd -n web --path /var/www/html/ curl http://127.0.0.1:8080/ cp -a docs/web/examples/hello.rpy.py /var/www/html/hello.rpy # jessie: cp -a doc/_downloads/hello.rpy.py /var/www/html/hello.rpy curl http://127.0.0.1:8080/hello.rpy python docs/web/examples/getpage.py http://debian.org # jessie: python doc/_downloads/getpage.py http://debian.org python docs/web/howto/listings/client/cookies.py # jessie: python doc/_downloads/cookies.py | Copyright (C) 2022, 2023 Sylvain Beucler