mirror of
https://github.com/python/cpython.git
synced 2025-10-20 08:23:47 +00:00
gh-108638: Fix tests when _stat extension is missing (#108689)
Fix test_inspect and test_pydoc when the _stat extension is missing. Skip tests relying on _stat when _stat is missing.
This commit is contained in:
parent
d48760b2f1
commit
c6d56135e1
2 changed files with 29 additions and 7 deletions
|
@ -1187,7 +1187,13 @@ def test_module_level_callable_noargs(self):
|
|||
"time()")
|
||||
|
||||
def test_module_level_callable_o(self):
|
||||
self.assertEqual(self._get_summary_line(stat.S_IMODE),
|
||||
try:
|
||||
import _stat
|
||||
except ImportError:
|
||||
# stat.S_IMODE() and _stat.S_IMODE() have a different signature
|
||||
self.skipTest('_stat extension is missing')
|
||||
|
||||
self.assertEqual(self._get_summary_line(_stat.S_IMODE),
|
||||
"S_IMODE(object, /)")
|
||||
|
||||
def test_unbound_builtin_method_noargs(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue