diff options
author | Martin Panter <vadmium+py@gmail.com> | 2016-05-15 00:13:04 +0000 |
---|---|---|
committer | Martin Panter <vadmium+py@gmail.com> | 2016-05-15 00:13:04 +0000 |
commit | 8a66e999bf91d0c309aa59126eaee3f4da382248 (patch) | |
tree | e38e803976bf6378018d086b27621f24a9059b5d /Lib/ctypes/test | |
parent | 3ba891be39514a86bb383323f983cb41a4df73a6 (diff) | |
download | cpython-8a66e999bf91d0c309aa59126eaee3f4da382248.tar.gz |
Issue #25533: Update documentation regarding the frozen modules table
* "ctypes" documentation was using Python 2 bytes-str equivalence.
* PyImport_FrozenModules is a pointer to const as of Python 3.4
Diffstat (limited to 'Lib/ctypes/test')
-rw-r--r-- | Lib/ctypes/test/test_values.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/ctypes/test/test_values.py b/Lib/ctypes/test/test_values.py index c7c78ce4e5..5a3a47f968 100644 --- a/Lib/ctypes/test/test_values.py +++ b/Lib/ctypes/test/test_values.py @@ -77,13 +77,14 @@ class PythonValuesTestCase(unittest.TestCase): self.assertTrue(entry.size, "{!r} was reported as having no size".format(entry.name)) continue - items.append((entry.name, entry.size)) + items.append((entry.name.decode("ascii"), entry.size)) - expected = [(b"__hello__", 161), - (b"__phello__", -161), - (b"__phello__.spam", 161), + expected = [("__hello__", 161), + ("__phello__", -161), + ("__phello__.spam", 161), ] - self.assertEqual(items, expected) + self.assertEqual(items, expected, "PyImport_FrozenModules example " + "in Doc/library/ctypes.rst may be out of date") self.assertEqual(sorted(bootstrap_seen), bootstrap_expected, "frozen bootstrap modules did not match PyImport_FrozenModules") |