diff --git a/testcode/BenchmarkTest00006.py b/testcode/BenchmarkTest00006.py
index 4f4d757..f9621fc 100644
--- a/testcode/BenchmarkTest00006.py
+++ b/testcode/BenchmarkTest00006.py
@@ -49,6 +49,9 @@ def BenchmarkTest00006_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00007.py b/testcode/BenchmarkTest00007.py
index fdbbc5e..8fb3a3b 100644
--- a/testcode/BenchmarkTest00007.py
+++ b/testcode/BenchmarkTest00007.py
@@ -45,6 +45,9 @@ def BenchmarkTest00007_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00009.py b/testcode/BenchmarkTest00009.py
index b407392..dcf56de 100644
--- a/testcode/BenchmarkTest00009.py
+++ b/testcode/BenchmarkTest00009.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00010.py b/testcode/BenchmarkTest00010.py
index bdc88b3..89c1486 100644
--- a/testcode/BenchmarkTest00010.py
+++ b/testcode/BenchmarkTest00010.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00085.py b/testcode/BenchmarkTest00085.py
index 5be9c78..5717d1c 100644
--- a/testcode/BenchmarkTest00085.py
+++ b/testcode/BenchmarkTest00085.py
@@ -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')
diff --git a/testcode/BenchmarkTest00086.py b/testcode/BenchmarkTest00086.py
index 4810222..07d2137 100644
--- a/testcode/BenchmarkTest00086.py
+++ b/testcode/BenchmarkTest00086.py
@@ -41,6 +41,9 @@ def BenchmarkTest00086_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00092.py b/testcode/BenchmarkTest00092.py
index 1ea5b43..356c8a9 100644
--- a/testcode/BenchmarkTest00092.py
+++ b/testcode/BenchmarkTest00092.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00093.py b/testcode/BenchmarkTest00093.py
index a3f8871..025ce69 100644
--- a/testcode/BenchmarkTest00093.py
+++ b/testcode/BenchmarkTest00093.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00094.py b/testcode/BenchmarkTest00094.py
index ff4652a..b4d1af8 100644
--- a/testcode/BenchmarkTest00094.py
+++ b/testcode/BenchmarkTest00094.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00175.py b/testcode/BenchmarkTest00175.py
index 2510f13..a6a83b8 100644
--- a/testcode/BenchmarkTest00175.py
+++ b/testcode/BenchmarkTest00175.py
@@ -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')
diff --git a/testcode/BenchmarkTest00176.py b/testcode/BenchmarkTest00176.py
index 07bcf80..6259502 100644
--- a/testcode/BenchmarkTest00176.py
+++ b/testcode/BenchmarkTest00176.py
@@ -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')
diff --git a/testcode/BenchmarkTest00177.py b/testcode/BenchmarkTest00177.py
index cb8d5fd..013f367 100644
--- a/testcode/BenchmarkTest00177.py
+++ b/testcode/BenchmarkTest00177.py
@@ -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')
diff --git a/testcode/BenchmarkTest00178.py b/testcode/BenchmarkTest00178.py
index c169899..29863c5 100644
--- a/testcode/BenchmarkTest00178.py
+++ b/testcode/BenchmarkTest00178.py
@@ -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')
diff --git a/testcode/BenchmarkTest00182.py b/testcode/BenchmarkTest00182.py
index da4e65d..7731ef8 100644
--- a/testcode/BenchmarkTest00182.py
+++ b/testcode/BenchmarkTest00182.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00199.py b/testcode/BenchmarkTest00199.py
index 59af28d..abd233c 100644
--- a/testcode/BenchmarkTest00199.py
+++ b/testcode/BenchmarkTest00199.py
@@ -49,9 +49,9 @@ def BenchmarkTest00199_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00200.py b/testcode/BenchmarkTest00200.py
index 08e889e..f3cd26d 100644
--- a/testcode/BenchmarkTest00200.py
+++ b/testcode/BenchmarkTest00200.py
@@ -51,9 +51,9 @@ def BenchmarkTest00200_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00201.py b/testcode/BenchmarkTest00201.py
index 304923f..e1e19e4 100644
--- a/testcode/BenchmarkTest00201.py
+++ b/testcode/BenchmarkTest00201.py
@@ -52,9 +52,9 @@ def BenchmarkTest00201_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00202.py b/testcode/BenchmarkTest00202.py
index b820c14..e728ab9 100644
--- a/testcode/BenchmarkTest00202.py
+++ b/testcode/BenchmarkTest00202.py
@@ -51,9 +51,9 @@ def BenchmarkTest00202_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00355.py b/testcode/BenchmarkTest00355.py
index 8361dfc..eed9169 100644
--- a/testcode/BenchmarkTest00355.py
+++ b/testcode/BenchmarkTest00355.py
@@ -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')
diff --git a/testcode/BenchmarkTest00356.py b/testcode/BenchmarkTest00356.py
index 6d25ae4..81a9a2f 100644
--- a/testcode/BenchmarkTest00356.py
+++ b/testcode/BenchmarkTest00356.py
@@ -42,6 +42,9 @@ def BenchmarkTest00356_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00361.py b/testcode/BenchmarkTest00361.py
index ec8e92c..d6db488 100644
--- a/testcode/BenchmarkTest00361.py
+++ b/testcode/BenchmarkTest00361.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00441.py b/testcode/BenchmarkTest00441.py
index d426d26..78431d1 100644
--- a/testcode/BenchmarkTest00441.py
+++ b/testcode/BenchmarkTest00441.py
@@ -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')
diff --git a/testcode/BenchmarkTest00442.py b/testcode/BenchmarkTest00442.py
index c1a3a43..3a8c9e9 100644
--- a/testcode/BenchmarkTest00442.py
+++ b/testcode/BenchmarkTest00442.py
@@ -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')
diff --git a/testcode/BenchmarkTest00447.py b/testcode/BenchmarkTest00447.py
index 6a3bcca..0aeccc5 100644
--- a/testcode/BenchmarkTest00447.py
+++ b/testcode/BenchmarkTest00447.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00448.py b/testcode/BenchmarkTest00448.py
index adb2d2b..434c7b1 100644
--- a/testcode/BenchmarkTest00448.py
+++ b/testcode/BenchmarkTest00448.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00521.py b/testcode/BenchmarkTest00521.py
index bc8eab3..dcd3639 100644
--- a/testcode/BenchmarkTest00521.py
+++ b/testcode/BenchmarkTest00521.py
@@ -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')
diff --git a/testcode/BenchmarkTest00522.py b/testcode/BenchmarkTest00522.py
index e2d9ad9..8ab7723 100644
--- a/testcode/BenchmarkTest00522.py
+++ b/testcode/BenchmarkTest00522.py
@@ -49,6 +49,9 @@ def BenchmarkTest00522_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00525.py b/testcode/BenchmarkTest00525.py
index cbe1fd3..ba2da1c 100644
--- a/testcode/BenchmarkTest00525.py
+++ b/testcode/BenchmarkTest00525.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00526.py b/testcode/BenchmarkTest00526.py
index 7a9ef13..9d35289 100644
--- a/testcode/BenchmarkTest00526.py
+++ b/testcode/BenchmarkTest00526.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00527.py b/testcode/BenchmarkTest00527.py
index f68a2ec..c466e7d 100644
--- a/testcode/BenchmarkTest00527.py
+++ b/testcode/BenchmarkTest00527.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00528.py b/testcode/BenchmarkTest00528.py
index 48c5ecb..0713cf4 100644
--- a/testcode/BenchmarkTest00528.py
+++ b/testcode/BenchmarkTest00528.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00537.py b/testcode/BenchmarkTest00537.py
index c32dd9a..0046456 100644
--- a/testcode/BenchmarkTest00537.py
+++ b/testcode/BenchmarkTest00537.py
@@ -52,9 +52,9 @@ def BenchmarkTest00537_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00616.py b/testcode/BenchmarkTest00616.py
index d7b557a..3c3893d 100644
--- a/testcode/BenchmarkTest00616.py
+++ b/testcode/BenchmarkTest00616.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00617.py b/testcode/BenchmarkTest00617.py
index 6adef63..73cab68 100644
--- a/testcode/BenchmarkTest00617.py
+++ b/testcode/BenchmarkTest00617.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00664.py b/testcode/BenchmarkTest00664.py
index a2e6130..902d3a6 100644
--- a/testcode/BenchmarkTest00664.py
+++ b/testcode/BenchmarkTest00664.py
@@ -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)}'
)
diff --git a/testcode/BenchmarkTest00675.py b/testcode/BenchmarkTest00675.py
index 078f400..b4b55f3 100644
--- a/testcode/BenchmarkTest00675.py
+++ b/testcode/BenchmarkTest00675.py
@@ -50,9 +50,9 @@ def BenchmarkTest00675_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00676.py b/testcode/BenchmarkTest00676.py
index cec771b..bc62e45 100644
--- a/testcode/BenchmarkTest00676.py
+++ b/testcode/BenchmarkTest00676.py
@@ -55,9 +55,9 @@ def BenchmarkTest00676_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00677.py b/testcode/BenchmarkTest00677.py
index 326bf80..a92c4d5 100644
--- a/testcode/BenchmarkTest00677.py
+++ b/testcode/BenchmarkTest00677.py
@@ -51,9 +51,9 @@ def BenchmarkTest00677_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00741.py b/testcode/BenchmarkTest00741.py
index 54e977a..add8775 100644
--- a/testcode/BenchmarkTest00741.py
+++ b/testcode/BenchmarkTest00741.py
@@ -39,6 +39,9 @@ def BenchmarkTest00741_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00745.py b/testcode/BenchmarkTest00745.py
index a92167c..19ef635 100644
--- a/testcode/BenchmarkTest00745.py
+++ b/testcode/BenchmarkTest00745.py
@@ -52,9 +52,9 @@ def BenchmarkTest00745_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)}'
)
diff --git a/testcode/BenchmarkTest00746.py b/testcode/BenchmarkTest00746.py
index f45c023..78cb6fc 100644
--- a/testcode/BenchmarkTest00746.py
+++ b/testcode/BenchmarkTest00746.py
@@ -58,9 +58,9 @@ def BenchmarkTest00746_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)}'
)
diff --git a/testcode/BenchmarkTest00747.py b/testcode/BenchmarkTest00747.py
index ae49bc1..b3d91c5 100644
--- a/testcode/BenchmarkTest00747.py
+++ b/testcode/BenchmarkTest00747.py
@@ -63,9 +63,9 @@ def BenchmarkTest00747_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)}'
)
diff --git a/testcode/BenchmarkTest00748.py b/testcode/BenchmarkTest00748.py
index d5b3191..a334cd1 100644
--- a/testcode/BenchmarkTest00748.py
+++ b/testcode/BenchmarkTest00748.py
@@ -54,9 +54,9 @@ def BenchmarkTest00748_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)}'
)
diff --git a/testcode/BenchmarkTest00756.py b/testcode/BenchmarkTest00756.py
index 78e0705..e92070b 100644
--- a/testcode/BenchmarkTest00756.py
+++ b/testcode/BenchmarkTest00756.py
@@ -56,9 +56,9 @@ def BenchmarkTest00756_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00757.py b/testcode/BenchmarkTest00757.py
index 9a7e3ec..3a35c03 100644
--- a/testcode/BenchmarkTest00757.py
+++ b/testcode/BenchmarkTest00757.py
@@ -53,9 +53,9 @@ def BenchmarkTest00757_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00831.py b/testcode/BenchmarkTest00831.py
index ea4eaa0..dfa1352 100644
--- a/testcode/BenchmarkTest00831.py
+++ b/testcode/BenchmarkTest00831.py
@@ -43,6 +43,9 @@ def BenchmarkTest00831_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00832.py b/testcode/BenchmarkTest00832.py
index 2eb86dd..9219b95 100644
--- a/testcode/BenchmarkTest00832.py
+++ b/testcode/BenchmarkTest00832.py
@@ -50,6 +50,9 @@ def BenchmarkTest00832_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00833.py b/testcode/BenchmarkTest00833.py
index 5eb20be..b262000 100644
--- a/testcode/BenchmarkTest00833.py
+++ b/testcode/BenchmarkTest00833.py
@@ -42,6 +42,9 @@ def BenchmarkTest00833_post():
import helpers.utils
+ fileName = None
+ fd = None
+
if '../' in bar:
RESPONSE += (
'File name must not contain \'../\''
diff --git a/testcode/BenchmarkTest00845.py b/testcode/BenchmarkTest00845.py
index f22a7f8..38d0986 100644
--- a/testcode/BenchmarkTest00845.py
+++ b/testcode/BenchmarkTest00845.py
@@ -58,9 +58,9 @@ def BenchmarkTest00845_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00846.py b/testcode/BenchmarkTest00846.py
index 45a1d56..f050f6f 100644
--- a/testcode/BenchmarkTest00846.py
+++ b/testcode/BenchmarkTest00846.py
@@ -62,9 +62,9 @@ def BenchmarkTest00846_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00847.py b/testcode/BenchmarkTest00847.py
index d1e6dd5..590aa3a 100644
--- a/testcode/BenchmarkTest00847.py
+++ b/testcode/BenchmarkTest00847.py
@@ -62,9 +62,9 @@ def BenchmarkTest00847_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest00914.py b/testcode/BenchmarkTest00914.py
index 832234f..5665fe8 100644
--- a/testcode/BenchmarkTest00914.py
+++ b/testcode/BenchmarkTest00914.py
@@ -52,6 +52,9 @@ def BenchmarkTest00914_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00915.py b/testcode/BenchmarkTest00915.py
index e2da59c..19ef942 100644
--- a/testcode/BenchmarkTest00915.py
+++ b/testcode/BenchmarkTest00915.py
@@ -49,6 +49,9 @@ def BenchmarkTest00915_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00916.py b/testcode/BenchmarkTest00916.py
index b8c03c1..c5e9fb5 100644
--- a/testcode/BenchmarkTest00916.py
+++ b/testcode/BenchmarkTest00916.py
@@ -48,6 +48,9 @@ def BenchmarkTest00916_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00917.py b/testcode/BenchmarkTest00917.py
index dfb1816..5532605 100644
--- a/testcode/BenchmarkTest00917.py
+++ b/testcode/BenchmarkTest00917.py
@@ -51,6 +51,9 @@ def BenchmarkTest00917_post():
)
return RESPONSE
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest00920.py b/testcode/BenchmarkTest00920.py
index 6caa8b1..6983a74 100644
--- a/testcode/BenchmarkTest00920.py
+++ b/testcode/BenchmarkTest00920.py
@@ -60,9 +60,9 @@ def BenchmarkTest00920_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)}'
)
diff --git a/testcode/BenchmarkTest00921.py b/testcode/BenchmarkTest00921.py
index 04b967a..995da34 100644
--- a/testcode/BenchmarkTest00921.py
+++ b/testcode/BenchmarkTest00921.py
@@ -62,9 +62,9 @@ def BenchmarkTest00921_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)}'
)
diff --git a/testcode/BenchmarkTest00927.py b/testcode/BenchmarkTest00927.py
index c7c0202..1cd8e8d 100644
--- a/testcode/BenchmarkTest00927.py
+++ b/testcode/BenchmarkTest00927.py
@@ -57,9 +57,9 @@ def BenchmarkTest00927_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest01008.py b/testcode/BenchmarkTest01008.py
index 46cafb3..74844b4 100644
--- a/testcode/BenchmarkTest01008.py
+++ b/testcode/BenchmarkTest01008.py
@@ -44,6 +44,9 @@ def BenchmarkTest01008_post():
import helpers.utils
+ fd = None
+ fileName = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest01011.py b/testcode/BenchmarkTest01011.py
index 4a843d5..0e6617a 100644
--- a/testcode/BenchmarkTest01011.py
+++ b/testcode/BenchmarkTest01011.py
@@ -59,9 +59,9 @@ def BenchmarkTest01011_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)}'
)
diff --git a/testcode/BenchmarkTest01012.py b/testcode/BenchmarkTest01012.py
index 0072d74..05d737e 100644
--- a/testcode/BenchmarkTest01012.py
+++ b/testcode/BenchmarkTest01012.py
@@ -58,9 +58,9 @@ def BenchmarkTest01012_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)}'
)
diff --git a/testcode/BenchmarkTest01013.py b/testcode/BenchmarkTest01013.py
index 3046025..074bb8d 100644
--- a/testcode/BenchmarkTest01013.py
+++ b/testcode/BenchmarkTest01013.py
@@ -55,9 +55,9 @@ def BenchmarkTest01013_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)}'
)
diff --git a/testcode/BenchmarkTest01023.py b/testcode/BenchmarkTest01023.py
index 1d7f9ab..7af8799 100644
--- a/testcode/BenchmarkTest01023.py
+++ b/testcode/BenchmarkTest01023.py
@@ -60,9 +60,9 @@ def BenchmarkTest01023_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest01108.py b/testcode/BenchmarkTest01108.py
index 9549336..04e5fbd 100644
--- a/testcode/BenchmarkTest01108.py
+++ b/testcode/BenchmarkTest01108.py
@@ -38,6 +38,9 @@ def BenchmarkTest01108_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{bar}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest01113.py b/testcode/BenchmarkTest01113.py
index 36b2926..476183e 100644
--- a/testcode/BenchmarkTest01113.py
+++ b/testcode/BenchmarkTest01113.py
@@ -53,9 +53,9 @@ def BenchmarkTest01113_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)}'
)
diff --git a/testcode/BenchmarkTest01117.py b/testcode/BenchmarkTest01117.py
index dc38b3d..72c6328 100644
--- a/testcode/BenchmarkTest01117.py
+++ b/testcode/BenchmarkTest01117.py
@@ -54,9 +54,9 @@ def BenchmarkTest01117_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest01118.py b/testcode/BenchmarkTest01118.py
index dcb65be..d6e9ed2 100644
--- a/testcode/BenchmarkTest01118.py
+++ b/testcode/BenchmarkTest01118.py
@@ -52,9 +52,9 @@ def BenchmarkTest01118_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)
diff --git a/testcode/BenchmarkTest01179.py b/testcode/BenchmarkTest01179.py
index 92d77e5..dae3c18 100644
--- a/testcode/BenchmarkTest01179.py
+++ b/testcode/BenchmarkTest01179.py
@@ -35,6 +35,9 @@ def BenchmarkTest01179_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{param}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest01180.py b/testcode/BenchmarkTest01180.py
index ba9b3d4..2a972d0 100644
--- a/testcode/BenchmarkTest01180.py
+++ b/testcode/BenchmarkTest01180.py
@@ -41,6 +41,9 @@ def BenchmarkTest01180_post():
)
return RESPONSE
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{param}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest01192.py b/testcode/BenchmarkTest01192.py
index bd9fafb..f0ee305 100644
--- a/testcode/BenchmarkTest01192.py
+++ b/testcode/BenchmarkTest01192.py
@@ -45,9 +45,9 @@ def BenchmarkTest01192_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(param)}\': '
f'{escape_for_html(e.strerror)}'
)
diff --git a/testcode/BenchmarkTest01214.py b/testcode/BenchmarkTest01214.py
index 04770e0..db08673 100644
--- a/testcode/BenchmarkTest01214.py
+++ b/testcode/BenchmarkTest01214.py
@@ -46,9 +46,9 @@ def BenchmarkTest01214_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(param)}\': '
f'{escape_for_html(e.strerror)}'
)
diff --git a/testcode/BenchmarkTest01222.py b/testcode/BenchmarkTest01222.py
index f956be4..cc26b2d 100644
--- a/testcode/BenchmarkTest01222.py
+++ b/testcode/BenchmarkTest01222.py
@@ -36,6 +36,9 @@ def BenchmarkTest01222_post():
import helpers.utils
+ fileName = None
+ fd = None
+
try:
fileName = f'{helpers.utils.TESTFILES_DIR}/{param}'
fd = open(fileName, 'wb')
diff --git a/testcode/BenchmarkTest01225.py b/testcode/BenchmarkTest01225.py
index 0c74a91..a138a39 100644
--- a/testcode/BenchmarkTest01225.py
+++ b/testcode/BenchmarkTest01225.py
@@ -48,9 +48,9 @@ def BenchmarkTest01225_post():
RESPONSE += (
f'Your XPATH query results are:
[ {', '.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))}\''
)