Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
env: py310
- python: "3.11"
env: py311
- python: "3.11"
env: py311-namespace
- python: "3.12"
env: py312
- python: pypy-3.10
Expand Down
1 change: 1 addition & 0 deletions LICENSE
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ include docs/conf.py
include docs/test_server.ini
include regen-docs
include tox.ini
include LICENSE
recursive-exclude docs/_build/_sources *
recursive-include docs/_build *.html
recursive-include tests *.txt *.py *.cgi *.html
Expand Down
6 changes: 6 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
"""Tests for Paste"""
import sys
import os

sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))

import pkg_resources
11 changes: 10 additions & 1 deletion tests/cgiapp_data/form.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,20 @@ print('Content-type: text/plain')
print('')

import sys
import warnings
from os.path import dirname

base_dir = dirname(dirname(dirname(__file__)))
sys.path.insert(0, base_dir)

with warnings.catch_warnings():
warnings.simplefilter("ignore", category=DeprecationWarning)
try:
import pkg_resources
except ImportError:
# Ignore
pass

from paste.util.field_storage import FieldStorage

class FormFieldStorage(FieldStorage):
Expand Down Expand Up @@ -52,7 +61,7 @@ class FormFieldStorage(FieldStorage):
return False


form = FieldStorage()
form = FormFieldStorage()

print('Filename:', form['up'].filename)
print('Name:', form['name'].value)
Expand Down
20 changes: 17 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
[tox]
envlist = py{36, 37, 38, 39, 310, 311, 312, py}
envlist = py{36, 37, 38, 39, 310, 311, 312, py},py311-namespace

[base]
deps =
pytest
setuptools

[testenv]
# For performance, but also for using "source" with coveragepy (https://github.com/nedbat/coveragepy/issues/268).
usedevelop = True
deps =
pytest
{[base]deps}
coverage: coverage
coverage: pytest-cov
setenv =
coverage: PYTEST_ADDOPTS=--cov --cov-report=term-missing
commands =
pytest {posargs}
python -m pytest {posargs}

# Test an environment where paste, pastedeploy and pastescript are already
# installed.
[testenv:py311-namespace]
deps =
{[base]deps}
Paste==3.9.0
PasteDeploy
pastescript