mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Doctest output simpler version (#7116)
* Update README.md Added Google Cirq references * Create barcode_validator.py Barcode/EAN validator * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update barcode_validator.py Included docstring and updated variables to snake_case * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update barcode_validator.py Included docset and updated bugs * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update barcode_validator.py Implemented the changes asked in review. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update barcode_validator.py Updated with f-string format * Update barcode_validator.py * Update volume_conversions.py Simpler doctest output * Update volume_conversions.py Fixed indentation Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
e40c7b4bf1
commit
fd5ab45492
|
@ -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
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue
Block a user