From 01b85661b9386944010be0cbd26136ebf266615f Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Wed, 9 Feb 2022 09:29:15 +0100 Subject: [PATCH] Fix "message" parameter of pytest.raises (part 2) --- tests/test_inventory.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_inventory.py b/tests/test_inventory.py index 70e4dfb7..056253dc 100644 --- a/tests/test_inventory.py +++ b/tests/test_inventory.py @@ -144,5 +144,7 @@ def test_create_existing_inventory(cli, tdb1): cli.invoke('inv', 'add', '--common') with tdb1.app_context(): assert db.has_schema('tdb1') - with pytest.raises(AssertionError, message='Schema tdb1 already exists.'): + + with pytest.raises(AssertionError): cli.invoke('inv', 'add', '--common') + pytest.fail('Schema tdb1 already exists.')