Skip to content

Commit d20f6c1

Browse files
committed
modified doctests
1 parent a280191 commit d20f6c1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

conversions/octal_to_decimal.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ def oct_to_decimal(oct_string: str) -> int:
99
>>> oct_to_decimal("-45")
1010
-37
1111
>>> oct_to_decimal("2-0Fm")
12+
Traceback (most recent call last):
13+
...
1214
ValueError: Non-octal value was passed to the function
1315
>>> oct_to_decimal("")
14-
ValueError: Empty string value was passed to the function
16+
Traceback (most recent call last):
17+
...
18+
ValueError: Empty string was passed to the function
1519
>>> oct_to_decimal("19")
20+
Traceback (most recent call last):
21+
...
1622
ValueError: Non-octal value was passed to the function
1723
"""
1824
oct_string = str(oct_string).strip()

0 commit comments

Comments
 (0)