Skip to content

Commit 59be8b5

Browse files
committed
unit test for generated IEnum (enthought#468)
1 parent 1615af5 commit 59be8b5

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

comtypes/test/test_enum.py

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import unittest as ut
2+
3+
import comtypes
4+
import comtypes.client
5+
6+
7+
class Test_Enum(ut.TestCase):
8+
def test_enum(self):
9+
comtypes.client.GetModule("msvidctl.dll")
10+
comtypes.client.GetModule("quartz.dll")
11+
from comtypes.gen import MSVidCtlLib as vidlib
12+
from comtypes.gen import QuartzTypeLib as quartz
13+
14+
# FilgraphManager has the same CLSID as FilterGraph
15+
filtergraph = comtypes.CoCreateInstance(
16+
quartz.FilgraphManager._reg_clsid_,
17+
vidlib.IGraphBuilder,
18+
comtypes.CLSCTX_INPROC_SERVER,
19+
)
20+
enum_filters = filtergraph.EnumFilters()
21+
# make sure enum_filters is iterable
22+
[_ for _ in enum_filters]
23+
24+
25+
if __name__ == "__main__":
26+
ut.main()

0 commit comments

Comments
 (0)