Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Import defusedxml's ElementTree under its own name

pycodestyle N817 flags a CamelCase module imported as an acronym. The
test now uses ElementTree.parse and ElementTree.ParseError directly.

Claude-Session: https://claude.ai/code/session_01Ji7xZMYjc4zankoc7hGBE1
Commit
98aa45f74647ab0e18d0a26615fb848f5f798745
Author
Leitwolf11 ·
Parents
bcb783b32b57

Files · Download .tar.gz

Changes

 tests/TestScripts/testBazelReporter.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tests/TestScripts/testBazelReporter.py b/tests/TestScripts/testBazelReporter.py
index a7c11eb5..3617a92b 100644
--- a/tests/TestScripts/testBazelReporter.py
+++ b/tests/TestScripts/testBazelReporter.py
@@ -12,7 +12,7 @@ import re
 import sys
 # defusedxml refuses entity declarations and external references, which the
 # standard parsers would expand.
-import defusedxml.ElementTree as ET
+from defusedxml import ElementTree
 import subprocess
 
 """
@@ -58,8 +58,8 @@ if ret.returncode != 42:
     exit(1)
 
 try:
-    tree = ET.parse(xml_out_path)
-except ET.ParseError as ex:
+    tree = ElementTree.parse(xml_out_path)
+except ElementTree.ParseError as ex:
     print("Invalid XML: '{}'".format(ex))
     raise
 except FileNotFoundError as ex: