Skip to content

Commit ab5aaa5

Browse files
committed
Add test
1 parent fad677f commit ab5aaa5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Lib/test/test_ctypes/test_loading.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,12 @@ def test_load_ordinal_functions(self):
100100

101101
self.assertRaises(AttributeError, dll.__getitem__, 1234)
102102

103+
@unittest.skipUnless(os.name == "nt", 'Windows-specific test')
104+
def test_load_without_name_and_with_handle(self):
105+
handle = ctypes.windll.kernel32._handle
106+
lib = ctypes.WinDLL(name=None, handle=handle)
107+
self.assertIs(handle, lib._handle)
108+
103109
@unittest.skipUnless(os.name == "nt", 'Windows-specific test')
104110
def test_1703286_A(self):
105111
# On winXP 64-bit, advapi32 loads at an address that does

0 commit comments

Comments
 (0)