test_grammar.py
PYTHON
Verdict: BENIGN
Local reference
Suspicious dependency
Inferred
| 132 |
self.assertTrue(0xffffffff > 0) |
|
| 133 |
self.assertTrue(0b1111111111111111111111111111111 > 0) |
|
| 134 |
for s in ('2147483648', '0o40000000000', '0x100000000', |
|
| 135 |
'0b10000000000000000000000000000000'): |
|
| 136 |
try: |
|
| 137 |
x = eval(s) |
eval() call (Python) |
| 138 |
except OverflowError: |
|
| 139 |
self.fail("OverflowError on huge integer literal %r" % s) |
|
| 303 |
for s in samples: |
|
| 304 |
with self.assertRaises(SyntaxError) as cm: |
|
| 305 |
compile(s, "<test>", "exec") |
Python compile() exec mode |
| 306 |
self.assertIn("was never closed", str(cm.exception)) |
|
| 446 |
def test_var_annot_simple_exec(self): |
|
| 447 |
gns = {}; lns= {} |
|
| 448 |
exec("'docstring'\n" |
exec API call |
| 449 |
"__annotations__[1] = 2\n" |
|
| 450 |
"x: int = 5\n", gns, lns) |
|
| 889 |
msg = "continue failed to continue inside try" |
|
| 890 |
except: |
|
| 891 |
msg = "continue inside try called except block" |
|
| 892 |
if msg != "ok": |
|
| 893 |
self.fail(msg) |
|
| 895 |
msg = "" |
|
| 896 |
while not msg: |
|
| 897 |
msg = "finally block not called" |
|
| 898 |
try: |
|
| 899 |
continue |
|
Objectives
-
0
# Python test set -- part 1, grammar.
×2
Micro-behaviors
| 446 |
def test_var_annot_simple_exec(self): |
|
| 447 |
gns = {}; lns= {} |
|
| 448 |
exec("'docstring'\n" |
|
| 449 |
"__annotations__[1] = 2\n" |
|
| 450 |
"x: int = 5\n", gns, lns) |
|
| 303 |
for s in samples: |
|
| 304 |
with self.assertRaises(SyntaxError) as cm: |
|
| 305 |
compile(s, "<test>", "exec") |
|
| 306 |
self.assertIn("was never closed", str(cm.exception)) |
|
| 446 |
def test_var_annot_simple_exec(self): |
|
| 447 |
gns = {}; lns= {} |
|
| 448 |
exec("'docstring'\n" |
|
| 449 |
"__annotations__[1] = 2\n" |
|
| 450 |
"x: int = 5\n", gns, lns) |
|
| 104 |
class TokenTests(unittest.TestCase): |
|
Metadata
| 104 |
class TokenTests(unittest.TestCase): |
|
| 4 |
from test.support import check_syntax_error |
|
| 5 |
from test.support import import_helper |
|
| 6 |
from test.support.warnings_helper import check_syntax_warning |
|
| 7 |
import inspect |
|
| 8 |
import unittest |
|
| 9 |
import sys |
|
-
0
# Python test set -- part 1, grammar.
×2
-
0
# Python test set -- part 1, grammar.
Identity
| SHA-256 |
748f4e2ae4bf7ff9b3da273e7949bf49d059be89fa488f14dd1a5629ad6c794b |
| Filename |
test_grammar.py |
Timeline
| First seen |
27 Jun 2026 21:29 UTC |
| First analyzed |
27 Jun 2026 21:50 UTC |
| Last analyzed |
27 Jun 2026 21:50 UTC |
| Last updated |
27 Jun 2026 21:50 UTC |
Labeling
| Label |
good |
| Label source |
harvest |
| Traits version |
868bd |