Raise exceptions on all warnings and errors in tests
This commit is contained in:
parent
5437100f08
commit
ab1ecc231d
|
@ -59,7 +59,7 @@ def event_loop(request):
|
|||
loop = asyncio.get_event_loop()
|
||||
yield loop
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
def raise_on_logger_msg():
|
||||
def proc(logger, method_name, event_dict):
|
||||
if method_name in ('warn', 'error'):
|
||||
|
|
|
@ -19,7 +19,7 @@ async def test_regex(get_version):
|
|||
"regex": 'for (\w+) examples',
|
||||
}) == "illustrative"
|
||||
|
||||
async def test_missing_ok(get_version, raise_on_logger_msg):
|
||||
async def test_missing_ok(get_version):
|
||||
assert await get_version("example", {
|
||||
"url": "http://example.net/",
|
||||
"regex": "foobar",
|
||||
|
|
Loading…
Reference in New Issue