diff options
Diffstat (limited to 'tests/unit/misc/test_sql.py')
-rw-r--r-- | tests/unit/misc/test_sql.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/misc/test_sql.py b/tests/unit/misc/test_sql.py index 80ab7513c..42207177e 100644 --- a/tests/unit/misc/test_sql.py +++ b/tests/unit/misc/test_sql.py @@ -406,7 +406,9 @@ class TestTransaction: with database.transaction(): my_table.insert({'column': 1}) my_table.insert({'column': 2}) - raise Exception('something went horribly wrong') - except Exception: + raise RuntimeError( + 'something went horribly wrong and the transaction will be aborted' + ) + except RuntimeError: pass assert database.query('select count(*) from my_table').run().value() == 0 |