Skip to content

Commit 44138dc

Browse files
authored
Fix test failures in ctypes and test_cmd_line_script (#6)
* Fix test failure in test_ctypes * Fix failure in test_cmd_line_script
1 parent 56d3d00 commit 44138dc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Lib/ctypes/test/test_values.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class struct_frozen(Structure):
8080
continue
8181
items.append((entry.name.decode("ascii"), entry.size))
8282

83-
expected = [("__hello__", 142),
84-
("__phello__", -142),
85-
("__phello__.spam", 142),
83+
expected = [("__hello__", 168),
84+
("__phello__", -168),
85+
("__phello__.spam", 168),
8686
]
8787
self.assertEqual(items, expected, "PyImport_FrozenModules example "
8888
"in Doc/library/ctypes.rst may be out of date")

Lib/test/test_cmd_line_script.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,10 +548,10 @@ def test_pep_409_verbiage(self):
548548
script_name = _make_test_script(script_dir, 'script', script)
549549
exitcode, stdout, stderr = assert_python_failure(script_name)
550550
text = stderr.decode('ascii').split('\n')
551-
self.assertEqual(len(text), 5)
551+
self.assertEqual(len(text), 6)
552552
self.assertTrue(text[0].startswith('Traceback'))
553553
self.assertTrue(text[1].startswith(' File '))
554-
self.assertTrue(text[3].startswith('NameError'))
554+
self.assertTrue(text[4].startswith('NameError'))
555555

556556
def test_non_ascii(self):
557557
# Mac OS X denies the creation of a file with an invalid UTF-8 name.

0 commit comments

Comments
 (0)