mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
refactor: Replace doctest traceback with ...
(#7558)
This commit is contained in:

committed by
GitHub

parent
0f06a0b5ff
commit
393b960525
@ -56,11 +56,7 @@ def pressure_conversion(value: float, from_type: str, to_type: str) -> float:
|
||||
0.019336718261000002
|
||||
>>> pressure_conversion(4, "wrongUnit", "atm")
|
||||
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__.pressure_conversion[8]>", line 1, in <module>
|
||||
pressure_conversion(4, "wrongUnit", "atm")
|
||||
File "<string>", line 67, in pressure_conversion
|
||||
...
|
||||
ValueError: Invalid 'from_type' value: 'wrongUnit' Supported values are:
|
||||
atm, pascal, bar, kilopascal, megapascal, psi, inHg, torr
|
||||
"""
|
||||
|
Reference in New Issue
Block a user