usb1.testUSB1: avoid using warnings.catch_warnings I wanted to use features which are not available in the current pypy release, so revert to alternating calls to warnings.filterwarnings and warnings.resetwarnings . Not as good, but avoid breaking tests on pypy.