Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:languages:python
python-hid-parser
pytest-catch-warnings.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pytest-catch-warnings.patch of Package python-hid-parser
--- hid-parser-0.0.3/tests/test_items.py +++ hid-parser-0.0.3/tests/test_items.py @@ -5,7 +5,7 @@ import pytest import hid_parser - +import warnings def test_baseitem(): item = hid_parser.BaseItem(1, 2) @@ -129,14 +129,18 @@ with pytest.warns(hid_parser.HIDComplianceWarning): hid_parser.VariableItem(1, 2, 0, hid_parser.Usage(0x0001, 0x0001), -1, 1) - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.VariableItem(1, 2, 0, hid_parser.Usage(0x0001, 0x0030), -1, 1) + warnings.simplefilter("error") - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.VariableItem(1, 2, 0, hid_parser.Usage(0x0001, 0x0000), -1, 1) + warnings.simplefilter("error") - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.VariableItem(1, 2, 0, hid_parser.Usage(0x0000, 0x0000), -1, 1) + warnings.simplefilter("error") + def test_arrayitem(): @@ -179,11 +183,14 @@ with pytest.warns(hid_parser.HIDComplianceWarning): hid_parser.ArrayItem(1, 2, 0, usages, -1, 1) - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.ArrayItem(1, 2, 0, usages, -1, 1) + warnings.simplefilter("error") - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.ArrayItem(1, 2, 0, usages, -1, 1) + warnings.simplefilter("error") - with pytest.warns(None): + with warnings.catch_warnings(): hid_parser.ArrayItem(1, 2, 0, usages, -1, 1) + warnings.simplefilter("error")
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor