mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
Set type names earlier in posixmodule.c (#140168)
This commit is contained in:
parent
7ac94fcb1d
commit
4641925bf2
2 changed files with 19 additions and 10 deletions
|
|
@ -164,6 +164,20 @@ def test_getcwdb(self):
|
|||
self.assertIsInstance(cwd, bytes)
|
||||
self.assertEqual(os.fsdecode(cwd), os.getcwd())
|
||||
|
||||
def test_type_fqdn(self):
|
||||
def fqdn(obj):
|
||||
return (obj.__module__, obj.__qualname__)
|
||||
|
||||
native = os.name
|
||||
self.assertEqual(fqdn(os.stat_result), ("os", "stat_result"))
|
||||
self.assertEqual(fqdn(os.times_result), (native, "times_result"))
|
||||
if hasattr(os, "statvfs_result"):
|
||||
self.assertEqual(fqdn(os.statvfs_result), ("os", "statvfs_result"))
|
||||
if hasattr(os, "sched_param"):
|
||||
self.assertEqual(fqdn(os.sched_param), (native, "sched_param"))
|
||||
if hasattr(os, "waitid_result"):
|
||||
self.assertEqual(fqdn(os.waitid_result), (native, "waitid_result"))
|
||||
|
||||
|
||||
# Tests creating TESTFN
|
||||
class FileTests(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue