├── .coveragerc ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── documentation.md │ └── feature_request.md └── workflows │ └── ci-tests.yml ├── .gitignore ├── CHANGELOG.rst ├── MANIFEST.in ├── README.rst ├── RELEASING.rst ├── contributing.md ├── docs ├── Makefile ├── api.rst ├── changelog.rst ├── conf.py ├── contributing.rst ├── debugapp.rst ├── form.html ├── forms.rst ├── index.rst ├── testapp.rst ├── testresponse.rst └── webtest.rst ├── license.rst ├── rtd.txt ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── compat.py ├── deploy.ini ├── html │ ├── 404.html │ ├── app.js │ ├── form_inputs.html │ ├── form_inputs_with_defaults.html │ ├── form_unicode_inputs.html │ ├── index.html │ └── message.html ├── test_app.py ├── test_authorisation.py ├── test_debugapp.py ├── test_ext.py ├── test_forms.py ├── test_http.py ├── test_lint.py ├── test_response.py ├── test_sel.py └── test_utils.py ├── tox.ini └── webtest ├── __init__.py ├── app.py ├── compat.py ├── debugapp.py ├── ext.py ├── forms.py ├── http.py ├── lint.py ├── response.py ├── sel.py └── utils.py /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | include = 3 | */webtest/*.py 4 | omit = 5 | */tests* 6 | */docs/*.py 7 | */site-packages* 8 | */lib/python* 9 | */lib-python* 10 | */lib_pypy* 11 | */src* 12 | 13 | [report] 14 | exclude_lines = 15 | pragma: no cover 16 | def __repr__ 17 | raise NotImplementedError 18 | if __name__ == .__main__.: 19 | def parse_args 20 | 21 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behaviour, in case poeple don't have core.autocrlf set 2 | * text=auto 3 | 4 | # Always lf, this file size is checked in a test 5 | tests/__init__.py text eol=lf 6 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug Report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | ## Get Support 8 | To get help or technical support, see [Get Support](https://pylonsproject.org/community-support.html). 9 | 10 | ## Bug Report 11 | 12 | Please [search the issue tracker](https://github.com/Pylons/webtest/issues) for similar issues before submitting a new issue. 13 | 14 | **Describe the bug** 15 | A clear and concise description of the bug. 16 | 17 | **To Reproduce** 18 | Steps to reproduce the behavior: 19 | 1. Go to '...' 20 | 2. Click on '....' 21 | 3. Scroll down to '....' 22 | 4. See error 23 | 24 | **Expected behavior** 25 | A clear and concise description of what you expected to happen. 26 | 27 | **Screenshots** 28 | If applicable, add screenshots to help explain the issue. 29 | 30 | **Additional context** 31 | Add any other context about the issue here. 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/documentation.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Documentation Suggestion 3 | about: Create an issue to improve our documentation 4 | 5 | --- 6 | 7 | ## Get Support 8 | To get help or technical support, see [Get Support](https://pylonsproject.org/community-support.html). 9 | 10 | ## Documentation Suggestion 11 | 12 | Please [search the issue tracker](https://github.com/Pylons/webtest/issues) for similar issues before submitting a new issue. 13 | 14 | **Describe the issue** 15 | A clear and concise description of the issue. 16 | 17 | **Include references** 18 | 1. Go to the URL '...' 19 | 2. Click on '....' 20 | 3. Scroll down to '....' 21 | 22 | **Describe the improvement** 23 | A clear and concise description of your suggestion. 24 | 25 | **Screenshots** 26 | If applicable, add screenshots to help explain the issue. 27 | 28 | **Additional context** 29 | Add any other context about the issue here. 30 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | ## Get Support 8 | To get help or technical support, see [Get Support](https://pylonsproject.org/community-support.html). 9 | 10 | ## Feature Request 11 | 12 | Please [search the issue tracker](https://github.com/Pylons/webtest/issues) for similar issues before submitting a new issue. 13 | 14 | **Is your feature request related to an issue? Please describe.** 15 | A clear and concise description of the issue. Example: "I'm always frustrated when [...]". 16 | 17 | **Describe the solution you'd like** 18 | A clear and concise description of what you want to happen. 19 | 20 | **Describe alternatives you've considered** 21 | A clear and concise description of any alternative solutions or features you've considered. 22 | 23 | **Additional context** 24 | Add any other context or screenshots about the feature request here. 25 | -------------------------------------------------------------------------------- /.github/workflows/ci-tests.yml: -------------------------------------------------------------------------------- 1 | name: Build and test 2 | 3 | on: 4 | # Build on pushes to main 5 | push: 6 | branches: 7 | - main 8 | tags: 9 | # Build pull requests 10 | pull_request: 11 | 12 | jobs: 13 | test: 14 | strategy: 15 | matrix: 16 | py: 17 | - "3.9" 18 | - "3.10" 19 | - "3.11" 20 | - "3.12" 21 | os: 22 | - "ubuntu-latest" 23 | - "windows-latest" 24 | # - "macos-latest" pip crash on macos 25 | architecture: 26 | - x64 27 | - x86 28 | exclude: 29 | # Linux and macOS don't have x86 python 30 | - os: "ubuntu-latest" 31 | architecture: x86 32 | - os: "macos-latest" 33 | architecture: x86 34 | 35 | name: "Python: ${{ matrix.py }}-${{ matrix.architecture }} on ${{ matrix.os }}" 36 | runs-on: ${{ matrix.os }} 37 | steps: 38 | - uses: actions/checkout@v4 39 | - name: Setup python 40 | uses: actions/setup-python@v5 41 | with: 42 | python-version: ${{ matrix.py }} 43 | architecture: ${{ matrix.architecture }} 44 | - run: pip install tox 45 | - name: Running tox 46 | run: tox -e py 47 | coverage: 48 | runs-on: ubuntu-latest 49 | name: Validate coverage 50 | # Assume coverage is identical across supported versions of Python. 51 | # Choose the latest Python. 52 | steps: 53 | - uses: actions/checkout@v4 54 | - name: Setup python 55 | uses: actions/setup-python@v5 56 | with: 57 | python-version: 3.12 58 | architecture: x64 59 | - run: pip install tox 60 | - run: tox -e py312,coverage 61 | docs: 62 | runs-on: ubuntu-latest 63 | name: Build the documentation 64 | steps: 65 | - uses: actions/checkout@v4 66 | - name: Setup python 67 | uses: actions/setup-python@v5 68 | with: 69 | python-version: 3.12 70 | architecture: x64 71 | - run: pip install tox 72 | - run: tox -e docs 73 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | WebTest.egg-info/ 2 | build/ 3 | dist/ 4 | bin/ 5 | parts/ 6 | develop-eggs/ 7 | docs/_build/ 8 | docs/_themes/ 9 | .installed.cfg 10 | .tox 11 | *.jar 12 | *.swp 13 | *.pyc 14 | *.xml 15 | .project 16 | .pydevproject 17 | .settings/ 18 | .coverage* 19 | eggs 20 | -------------------------------------------------------------------------------- /CHANGELOG.rst: -------------------------------------------------------------------------------- 1 | News 2 | ==== 3 | 4 | 3.0.8 (unreleased) 5 | ------------------ 6 | 7 | - Nothing changed yet. 8 | 9 | 10 | 3.0.7 (2025-10-06) 11 | ------------------ 12 | 13 | - Response.html is now a cached property to improve form parsing performance 14 | 15 | 16 | 3.0.6 (2025-06-04) 17 | ------------------ 18 | 19 | - Fix a bug that inputs outside of a ``
`` tag were considered 20 | belonging to that form because they had a HTML representation identical 21 | to some input inside that ````. 22 | 23 | 24 | 3.0.5 (2025-06-04) 25 | ------------------ 26 | 27 | - Strip ``