Skip to content

Doctest output simpler version #7116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Oct 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions conversions/volume_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ def volume_conversion(value: float, from_type: str, to_type: str) -> float:
0.000236588
>>> volume_conversion(4, "wrongUnit", "litre")
Traceback (most recent call last):
File "/usr/lib/python3.8/doctest.py", line 1336, in __run
exec(compile(example.source, filename, "single",
File "<doctest __main__.volume_conversion[7]>", line 1, in <module>
volume_conversion(4, "wrongUnit", "litre")
File "<string>", line 62, in volume_conversion
...
ValueError: Invalid 'from_type' value: 'wrongUnit' Supported values are:
cubicmeter, litre, kilolitre, gallon, cubicyard, cubicfoot, cup
"""
Expand Down