colnotab / cpython

The Python programming language
https://www.python.org/
Other
0 stars 0 forks source link

Fix test failures in ctypes and test_cmd_line_script #6

Closed ammaraskar closed 3 years ago

ammaraskar commented 3 years ago

test_ctypes

This test needed an update, looks like it's trying to find exact offsets for symbols in frozen modules that have been moved around due to the extra data.

test test_ctypes failed -- Traceback (most recent call last):
  File "C:\Users\ammar\workspace\cpython\lib\ctypes\test\test_values.py", line 87, in test_frozentable
    self.assertEqual(items, expected, "PyImport_FrozenModules example "
AssertionError: Lists differ: [('__hello__', 168), ('__phello__', -168), ('__phello__.spam', 168)] != [('__hello__', 142), ('__phello__', -142), ('__phello__.spam', 142)]

First differing element 0:
('__hello__', 168)
('__hello__', 142)

- [('__hello__', 168), ('__phello__', -168), ('__phello__.spam', 168)]
?                 ^^                    ^^                        ^^

+ [('__hello__', 142), ('__phello__', -142), ('__phello__.spam', 142)]
?                 ^^                    ^^                        ^^
 : PyImport_FrozenModules example in Doc/library/ctypes.rst may be out of date

test_cmd_line_script

Checks the length and output of a traceback output which now has one extra line.

test test_cmd_line_script failed -- Traceback (most recent call last):
  File "C:\Users\ammar\workspace\cpython\lib\test\test_cmd_line_script.py", line 551, in test_pep_409_verbiage
    self.assertEqual(len(text), 5)
AssertionError: 6 != 5