Skip to content

Commit 73ea353

Browse files
committed
Debug issue with tests running as GitHub action
1 parent 4252064 commit 73ea353

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ jobs:
2323
env: pypy3
2424
name: ${{ matrix.env }} on Python ${{ matrix.python }}
2525
steps:
26-
- uses: actions/checkout@v3
27-
- uses: actions/setup-python@v3
26+
- uses: actions/checkout@v4
27+
- uses: actions/setup-python@v5
2828
with:
2929
python-version: ${{ matrix.python }}
3030
- run: pip install tox

paste/wsgilib.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,9 @@ def flush(self):
378378
def write(self, value):
379379
if not value:
380380
return
381-
raise AssertionError(
382-
"No errors should be written (got: %r)" % value)
381+
print(value) # for debugging
382+
# raise AssertionError(
383+
# "No errors should be written (got: %r)" % value)
383384

384385
def writelines(self, seq):
385386
raise AssertionError(

tests/cgiapp_data/form.cgi

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#!/usr/bin/env python
22

3-
from paste.util.field_storage import FieldStorage
4-
53
print('Content-type: text/plain')
64
print('')
75

6+
try:
7+
from paste.util.field_storage import FieldStorage
8+
except Exception as e:
9+
import os
10+
raise ValueError("getcwd %s" % os.getcwd())
11+
812

913
class FormFieldStorage(FieldStorage):
1014

@@ -41,10 +45,8 @@ class FormFieldStorage(FieldStorage):
4145
raise error
4246

4347
def __contains__(self, key):
44-
superobj = super(FieldStorage, self)
45-
4648
for candidate in self._key_candidates(key):
47-
if superobj.__contains__(candidate):
49+
if super().__contains__(candidate):
4850
return True
4951
return False
5052

tests/test_cgiapp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def test_form():
4747
assert 'file.txt' in res
4848
assert 'joe' in res
4949
assert 'x'*10000 in res
50+
assert 0 # for debugging
5051

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

0 commit comments

Comments
 (0)