Skip to content

Commit

Permalink
Debug issue with tests running as GitHub action
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Apr 21, 2024
1 parent 4252064 commit 5737d6f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
env: pypy3
name: ${{ matrix.env }} on Python ${{ matrix.python }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v5
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- run: pip install tox
Expand Down
5 changes: 3 additions & 2 deletions paste/wsgilib.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ def flush(self):
def write(self, value):
if not value:
return
raise AssertionError(
"No errors should be written (got: %r)" % value)
print(value) # for debugging
# raise AssertionError(
# "No errors should be written (got: %r)" % value)

def writelines(self, seq):
raise AssertionError(
Expand Down
4 changes: 1 addition & 3 deletions tests/cgiapp_data/form.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,8 @@ class FormFieldStorage(FieldStorage):
raise error

def __contains__(self, key):
superobj = super(FieldStorage, self)

for candidate in self._key_candidates(key):
if superobj.__contains__(candidate):
if super().__contains__(candidate):
return True
return False

Expand Down
1 change: 1 addition & 0 deletions tests/test_cgiapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def test_form():
assert 'file.txt' in res
assert 'joe' in res
assert 'x'*10000 in res
assert 0 # for debugging

def test_error():
app = TestApp(CGIApplication({}, script='error.cgi', path=[data_dir]))
Expand Down

0 comments on commit 5737d6f

Please sign in to comment.