Skip to content

Commit f1ba043

Browse files
committed
. t convert to approval test
1 parent fea655d commit f1ba043

1 file changed

Lines changed: 14 additions & 9 deletions

File tree

tests/test_exceptions.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
1-
from approvaltests import ApprovalException
1+
from approvaltests import ApprovalException, Options, verify
22
from approvaltests.reporter_missing_exception import ReporterMissingException
33

44

55
def test_ApprovalException_repr() -> None:
6-
assert "ApprovalException('hello')" == repr(ApprovalException("hello"))
6+
"""
7+
ApprovalException('hello')
8+
"""
9+
verify(repr(ApprovalException("hello")), options=Options().inline())
710

811

912
def test_ReporterMissingException_repr() -> None:
10-
assert "ReporterMissingException('MY_REPORTER')" == repr(
11-
ReporterMissingException("MY_REPORTER")
12-
)
13+
"""
14+
ReporterMissingException('MY_REPORTER')
15+
"""
16+
verify(repr(ReporterMissingException("MY_REPORTER")), options=Options().inline())
17+
1318

1419
def test_ReporterMissingException_str() -> None:
15-
assert (
16-
"Could not find 'MY_REPORTER' in the environment, perhaps you need to configure your reporter."
17-
== str(ReporterMissingException("MY_REPORTER"))
18-
)
20+
"""
21+
Could not find 'MY_REPORTER' in the environment, perhaps you need to configure your reporter.
22+
"""
23+
verify(str(ReporterMissingException("MY_REPORTER")), options=Options().inline())

0 commit comments

Comments
 (0)