Skip to content

Commit a8f9a90

Browse files
committed
Align codegen metadata with CPython
1 parent 06f73f2 commit a8f9a90

19 files changed

Lines changed: 5441 additions & 1190 deletions

File tree

.cspell.dict/cpython.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ argtypes
55
asdl
66
asname
77
atopen
8+
atext
89
attro
910
augassign
1011
badcert
@@ -104,6 +105,7 @@ inlinedepth
104105
inplace
105106
inpos
106107
isbytecode
108+
ishidden
107109
ismine
108110
ISPOINTER
109111
isoctal
@@ -113,6 +115,7 @@ keeped
113115
kwnames
114116
kwonlyarg
115117
kwonlyargs
118+
kwonlydefaults
116119
lasti
117120
libffi
118121
linearise
@@ -164,6 +167,7 @@ patma
164167
peepholer
165168
phcount
166169
platstdlib
170+
ploc
167171
posonlyarg
168172
posonlyargs
169173
prec
@@ -209,6 +213,7 @@ staticbase
209213
stginfo
210214
storefast
211215
stringlib
216+
stringized
212217
structseq
213218
subkwargs
214219
subparams

Lib/test/test_compile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,6 @@ def get_code_lines(self, code):
12491249
last_line = line
12501250
return res
12511251

1252-
@unittest.expectedFailure # TODO: RUSTPYTHON
12531252
def test_lineno_attribute(self):
12541253
def load_attr():
12551254
return (
@@ -1294,7 +1293,6 @@ def aug_store_attr():
12941293
code_lines = self.get_code_lines(func.__code__)
12951294
self.assertEqual(lines, code_lines)
12961295

1297-
@unittest.expectedFailure # TODO: RUSTPYTHON; + [0]
12981296
def test_line_number_genexp(self):
12991297

13001298
def return_genexp():

Lib/test/test_dis.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,6 @@ def test_disassemble_fstring(self):
12151215
def test_disassemble_with(self):
12161216
self.do_disassembly_test(_with, dis_with)
12171217

1218-
@unittest.expectedFailure # TODO: RUSTPYTHON
12191218
def test_disassemble_asyncwith(self):
12201219
self.do_disassembly_test(_asyncwith, dis_asyncwith)
12211220

@@ -1991,26 +1990,22 @@ def test_first_line_set_to_None(self):
19911990
actual = dis.get_instructions(simple, first_line=None)
19921991
self.assertInstructionsEqual(list(actual), expected_opinfo_simple)
19931992

1994-
@unittest.expectedFailure # TODO: RUSTPYTHON
19951993
def test_outer(self):
19961994
actual = dis.get_instructions(outer, first_line=expected_outer_line)
19971995
self.assertInstructionsEqual(list(actual), expected_opinfo_outer)
19981996

1999-
@unittest.expectedFailure # TODO: RUSTPYTHON
20001997
def test_nested(self):
20011998
with captured_stdout():
20021999
f = outer()
20032000
actual = dis.get_instructions(f, first_line=expected_f_line)
20042001
self.assertInstructionsEqual(list(actual), expected_opinfo_f)
20052002

2006-
@unittest.expectedFailure # TODO: RUSTPYTHON
20072003
def test_doubly_nested(self):
20082004
with captured_stdout():
20092005
inner = outer()()
20102006
actual = dis.get_instructions(inner, first_line=expected_inner_line)
20112007
self.assertInstructionsEqual(list(actual), expected_opinfo_inner)
20122008

2013-
@unittest.expectedFailure # TODO: RUSTPYTHON
20142009
def test_jumpy(self):
20152010
actual = dis.get_instructions(jumpy, first_line=expected_jumpy_line)
20162011
self.assertInstructionsEqual(list(actual), expected_opinfo_jumpy)
@@ -2314,7 +2309,6 @@ def test_iteration(self):
23142309
via_generator = list(dis.get_instructions(obj))
23152310
self.assertInstructionsEqual(via_object, via_generator)
23162311

2317-
@unittest.expectedFailure # TODO: RUSTPYTHON
23182312
def test_explicit_first_line(self):
23192313
actual = dis.Bytecode(outer, first_line=expected_outer_line)
23202314
self.assertInstructionsEqual(list(actual), expected_opinfo_outer)

Lib/test/test_exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2245,7 +2245,6 @@ def test_assertion_error_location(self):
22452245
result = run_script(source)
22462246
self.assertEqual(result[-3:], expected)
22472247

2248-
@unittest.expectedFailure # TODO: RUSTPYTHON
22492248
@force_not_colorized
22502249
def test_multiline_not_highlighted(self):
22512250
cases = [

Lib/test/test_inspect/test_inspect.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,6 @@ class FakePackage:
237237

238238
self.assertFalse(inspect.ispackage(FakePackage()))
239239

240-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: False is not true
241240
def test_iscoroutine(self):
242241
async_gen_coro = async_generator_function_example(1)
243242
gen_coro = gen_coroutine_function_example(1)

Lib/test/test_py_compile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ def test_exceptions_propagate(self):
132132
finally:
133133
os.chmod(self.directory, mode.st_mode)
134134

135-
@unittest.expectedFailure # TODO: RUSTPYTHON
136135
def test_bad_coding(self):
137136
bad_coding = os.path.join(os.path.dirname(__file__),
138137
'tokenizedata',
@@ -198,7 +197,6 @@ def test_invalidation_mode(self):
198197
fp.read(), 'test', {})
199198
self.assertEqual(flags, 0b1)
200199

201-
@unittest.expectedFailure # TODO: RUSTPYTHON
202200
def test_quiet(self):
203201
bad_coding = os.path.join(os.path.dirname(__file__),
204202
'tokenizedata',

Lib/test/test_strtod.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ def test_halfway_cases(self):
173173
s = '{}e{}'.format(digits, exponent)
174174
self.check_strtod(s)
175175

176-
@unittest.expectedFailure # TODO: RUSTPYTHON
177176
def test_boundaries(self):
178177
# boundaries expressed as triples (n, e, u), where
179178
# n*10**e is an approximation to the boundary value and
@@ -194,7 +193,6 @@ def test_boundaries(self):
194193
u *= 10
195194
e -= 1
196195

197-
@unittest.expectedFailure # TODO: RUSTPYTHON
198196
def test_underflow_boundary(self):
199197
# test values close to 2**-1075, the underflow boundary; similar
200198
# to boundary_tests, except that the random error doesn't scale
@@ -206,7 +204,6 @@ def test_underflow_boundary(self):
206204
s = '{}e{}'.format(digits, exponent)
207205
self.check_strtod(s)
208206

209-
@unittest.expectedFailure # TODO: RUSTPYTHON
210207
def test_bigcomp(self):
211208
for ndigs in 5, 10, 14, 15, 16, 17, 18, 19, 20, 40, 41, 50:
212209
dig10 = 10**ndigs
@@ -284,7 +281,6 @@ def negative_exp(n):
284281
self.assertEqual(float(negative_exp(20000)), 1.0)
285282
self.assertEqual(float(negative_exp(30000)), 1.0)
286283

287-
@unittest.expectedFailure # TODO: RUSTPYTHON
288284
def test_particular(self):
289285
# inputs that produced crashes or incorrectly rounded results with
290286
# previous versions of dtoa.c, for various reasons

Lib/test/test_sys_settrace.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1488,8 +1488,6 @@ def test_jump_in_nested_finally_3(output):
14881488
output.append(11)
14891489
output.append(12)
14901490

1491-
# TODO: RUSTPYTHON
1492-
@unittest.expectedFailure
14931491
@jump_test(5, 11, [2, 4], (ValueError, 'after'))
14941492
def test_no_jump_over_return_try_finally_in_finally_block(output):
14951493
try:

Lib/test/test_unittest/test_async_case.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ async def on_cleanup2(self):
296296
test.doCleanups()
297297
self.assertEqual(events, ['asyncSetUp', 'test', 'asyncTearDown', 'cleanup2', 'cleanup1'])
298298

299-
@unittest.expectedFailure # TODO: RUSTPYTHON
300299
def test_deprecation_of_return_val_from_test(self):
301300
# Issue 41322 - deprecate return of value that is not None from a test
302301
class Nothing:

0 commit comments

Comments
 (0)