mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-22 23:33:02 +08:00
Remove exception detail from doctest (#5430)
* Remove exception detail from doctest These details are configuration dependant so should be removed according to https://docs.python.org/3/library/doctest.html * updating DIRECTORY.md Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -81,11 +81,7 @@ def length_conversion(value: float, from_type: str, to_type: str) -> float:
|
||||
0.1181103
|
||||
>>> length_conversion(4, "wrongUnit", "inch")
|
||||
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__.length_conversion[18]>", line 1, in <module>
|
||||
length_conversion(4, "wrongUnit", "inch")
|
||||
File "<string>", line 85, in length_conversion
|
||||
...
|
||||
ValueError: Invalid 'from_type' value: 'wrongUnit' Supported values are:
|
||||
meter, kilometer, feet, inch, centimeter, yard, foot, mile, millimeter
|
||||
"""
|
||||
|
Reference in New Issue
Block a user