mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
gh-65961: Do not rely solely on __cached__
(GH-97990)
Make sure `__spec__.cached` (at minimum) can be used.
This commit is contained in:
parent
f8edc6ff53
commit
e1c4d56fdd
11 changed files with 130 additions and 35 deletions
|
@ -702,7 +702,7 @@ class PydocDocTest(unittest.TestCase):
|
|||
def test_synopsis_sourceless(self):
|
||||
os = import_helper.import_fresh_module('os')
|
||||
expected = os.__doc__.splitlines()[0]
|
||||
filename = os.__cached__
|
||||
filename = os.__spec__.cached
|
||||
synopsis = pydoc.synopsis(filename)
|
||||
|
||||
self.assertEqual(synopsis, expected)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue