Skip to content
Open
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
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00006.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def BenchmarkTest00006_post():

import helpers.utils

fileName = None
fd = None

if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00007.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def BenchmarkTest00007_post():

import helpers.utils

fileName = None
fd = None

if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00009.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def BenchmarkTest00009_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00010.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def BenchmarkTest00010_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00085.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def BenchmarkTest00085_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00086.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ def BenchmarkTest00086_post():

import helpers.utils

fileName = None
fd = None

if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00092.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def BenchmarkTest00092_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00093.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def BenchmarkTest00093_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00094.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def BenchmarkTest00094_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00175.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def BenchmarkTest00175_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00176.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ def BenchmarkTest00176_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00177.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def BenchmarkTest00177_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00178.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ def BenchmarkTest00178_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00182.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def BenchmarkTest00182_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00199.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def BenchmarkTest00199_post():
RESPONSE += (
f'Your XPATH query results are: <br>[ {', '.join(node_strings)} ]'
)
except:
except Exception as e:
RESPONSE += (
f'Error parsing XPath Query: \'{escape_for_html(query)}\''
f'Error parsing XPath Query: \'{escape_for_html(str(e))}\''
)


Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00200.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def BenchmarkTest00200_post():
RESPONSE += (
f'Your XPATH query results are: <br>[ {', '.join(node_strings)} ]'
)
except:
except Exception as e:
RESPONSE += (
f'Error parsing XPath Query: \'{escape_for_html(query)}\''
f'Error parsing XPath Query: \'{escape_for_html(str(e))}\''
)


Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00201.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def BenchmarkTest00201_post():
RESPONSE += (
f'Your XPATH query results are: <br>[ {', '.join(node_strings)} ]'
)
except:
except Exception as e:
RESPONSE += (
f'Error parsing XPath Query: \'{escape_for_html(query)}\''
f'Error parsing XPath Query: \'{escape_for_html(str(e))}\''
)


Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00202.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def BenchmarkTest00202_post():
RESPONSE += (
f'Your XPATH query results are: <br>[ {', '.join(node_strings)} ]'
)
except:
except Exception as e:
RESPONSE += (
f'Error parsing XPath Query: \'{escape_for_html(query)}\''
f'Error parsing XPath Query: \'{escape_for_html(str(e))}\''
)


Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00355.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def BenchmarkTest00355_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00356.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def BenchmarkTest00356_post():

import helpers.utils

fileName = None
fd = None

if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00361.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def BenchmarkTest00361_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00441.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def BenchmarkTest00441_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00442.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def BenchmarkTest00442_post():
)
return RESPONSE

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00447.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def BenchmarkTest00447_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00448.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def BenchmarkTest00448_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00521.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def BenchmarkTest00521_post():

import helpers.utils

fileName = None
fd = None

try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
Expand Down
3 changes: 3 additions & 0 deletions testcode/BenchmarkTest00522.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def BenchmarkTest00522_post():

import helpers.utils

fileName = None
fd = None

if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00525.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ def BenchmarkTest00525_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00526.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def BenchmarkTest00526_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00527.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ def BenchmarkTest00527_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00528.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def BenchmarkTest00528_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00537.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def BenchmarkTest00537_post():
RESPONSE += (
f'Your XPATH query results are: <br>[ {', '.join(node_strings)} ]'
)
except:
except Exception as e:
RESPONSE += (
f'Error parsing XPath Query: \'{escape_for_html(query)}\''
f'Error parsing XPath Query: \'{escape_for_html(str(e))}\''
)


Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00616.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def BenchmarkTest00616_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00617.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def BenchmarkTest00617_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
4 changes: 2 additions & 2 deletions testcode/BenchmarkTest00664.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def BenchmarkTest00664_post():
f'The beginning of file: \'{escape_for_html(str(p))}\' is:\n\n'
f'{escape_for_html(p.read_text()[:1000])}'
)
except OSError:
except OSError as e:
RESPONSE += (
f'Problem reading from file \'{{escape_for_html(fileName)}}\': '
f'Problem reading from file \'{escape_for_html(bar)}\': '
f'{escape_for_html(e.strerror)}'
)

Expand Down
Loading