OXIESEC PANEL
- Current Dir:
/
/
snap
/
core24
/
988
/
usr
/
lib
/
python3.12
/
test
/
support
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/04/2025 04:37:50 PM
rwxr-xr-x
📄
__init__.py
78.13 KB
02/04/2025 02:48:35 PM
rw-r--r--
📁
__pycache__
-
05/04/2025 04:37:50 PM
rwxr-xr-x
📁
_hypothesis_stubs
-
05/04/2025 04:37:50 PM
rwxr-xr-x
📄
ast_helper.py
1.79 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
asynchat.py
11.33 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
asyncore.py
19.9 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
bytecode_helper.py
4.88 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
hashlib_helper.py
1.86 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
hypothesis_helper.py
1.35 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
import_helper.py
10.48 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
interpreters.py
5.67 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
logging_helper.py
916 bytes
02/04/2025 02:48:35 PM
rw-r--r--
📄
os_helper.py
23.72 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
pty_helper.py
2.98 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
script_helper.py
11.45 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
smtpd.py
30.01 KB
02/04/2025 02:48:35 PM
rwxr-xr-x
📄
socket_helper.py
13.47 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
testcase.py
1.02 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
threading_helper.py
7.86 KB
02/04/2025 02:48:35 PM
rw-r--r--
📄
warnings_helper.py
6.69 KB
02/04/2025 02:48:35 PM
rw-r--r--
Editing: ast_helper.py
Close
import ast class ASTTestMixin: """Test mixing to have basic assertions for AST nodes.""" def assertASTEqual(self, ast1, ast2): # Ensure the comparisons start at an AST node self.assertIsInstance(ast1, ast.AST) self.assertIsInstance(ast2, ast.AST) # An AST comparison routine modeled after ast.dump(), but # instead of string building, it traverses the two trees # in lock-step. def traverse_compare(a, b, missing=object()): if type(a) is not type(b): self.fail(f"{type(a)!r} is not {type(b)!r}") if isinstance(a, ast.AST): for field in a._fields: value1 = getattr(a, field, missing) value2 = getattr(b, field, missing) # Singletons are equal by definition, so further # testing can be skipped. if value1 is not value2: traverse_compare(value1, value2) elif isinstance(a, list): try: for node1, node2 in zip(a, b, strict=True): traverse_compare(node1, node2) except ValueError: # Attempt a "pretty" error ala assertSequenceEqual() len1 = len(a) len2 = len(b) if len1 > len2: what = "First" diff = len1 - len2 else: what = "Second" diff = len2 - len1 msg = f"{what} list contains {diff} additional elements." raise self.failureException(msg) from None elif a != b: self.fail(f"{a!r} != {b!r}") traverse_compare(ast1, ast2)