Skip to content

Commit

Permalink
Issue #33 restore warning in check_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Jan 23, 2024
1 parent f050b53 commit e44c22e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import logging
import math
import warnings
from pathlib import Path
from typing import List, Tuple, Union

Expand Down Expand Up @@ -284,9 +285,7 @@ def check_exception(example, result):
# todo: we should assert here and remove the warning, but right now tooling doesn't really implement this
# assert result.__class__.__name__ == example["throws"]
if result.__class__.__name__ != example["throws"]:
_log.warning(
f"Expected exception {example['throws']} but got {result.__class__}"
)
warnings.warn(f"Expected exception {example['throws']} but got {result!r}")


def check_return_value(example, result, connection, file):
Expand Down

0 comments on commit e44c22e

Please sign in to comment.