Skip to content

Commit 6944bdf

Browse files
committed
Fix test_directshow.
1 parent 14277ab commit 6944bdf

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

comtypes/test/test_directshow.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ def iterate_moniker(enum_mon: IEnumMoniker) -> Iterator[IMoniker]:
4949
(item, fetched) = enum_mon.RemoteNext(1)
5050

5151

52-
def get_friendly_name(pb: IPropertyBag) -> str:
53-
return pb.Read("FriendlyName", VARIANT(), None)
54-
55-
5652
class Test(unittest.TestCase):
5753
def test(self):
5854
dev_enum = comtypes.client.CreateObject(
@@ -63,10 +59,9 @@ def test(self):
6359
class_enum = dev_enum.CreateClassEnumerator(CLSID_AudioCompressorCategory, 0)
6460
for mon in iterate_moniker(class_enum):
6561
pb = mon.QueryInterface(IPropertyBag)
66-
name = get_friendly_name(pb)
62+
name = pb.Read("FriendlyName", VARIANT(), None)
6763
with self.subTest(name=name):
6864
self.assertIsInstance(name, str)
69-
print(name)
7065
break # A single item is enough to test the COM features.
7166
else:
7267
# If no item is detected, the test will be skipped.

0 commit comments

Comments
 (0)