usb1.testUSB1: Silence a deprecation warning triggered as part of the test
diff --git a/usb1/testUSB1.py b/usb1/testUSB1.py
index b978045..b2f7ecb 100644
--- a/usb1/testUSB1.py
+++ b/usb1/testUSB1.py
@@ -21,6 +21,7 @@
import gc
import itertools
import unittest
+import warnings
import weakref
import usb1
from . import libusb1
@@ -328,7 +329,11 @@
"""
context = USBContext() # Deprecated
try:
- fd_list = context.getPollFDList()
+ with warnings.catch_warnings(
+ action='ignore',
+ category=DeprecationWarning,
+ ):
+ fd_list = context.getPollFDList()
except NotImplementedError:
raise unittest.SkipTest(
'libusb without file descriptor events',