mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +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
|
@ -4358,8 +4358,11 @@ class TestMain(unittest.TestCase):
|
|||
'unittest', '--details')
|
||||
output = out.decode()
|
||||
# Just a quick sanity check on the output
|
||||
self.assertIn(module.__spec__.name, output)
|
||||
self.assertIn(module.__name__, output)
|
||||
self.assertIn(module.__spec__.origin, output)
|
||||
self.assertIn(module.__file__, output)
|
||||
self.assertIn(module.__spec__.cached, output)
|
||||
self.assertIn(module.__cached__, output)
|
||||
self.assertEqual(err, b'')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue