Skip to content

Commit e84d0bd

Browse files
Fix testmod string
1 parent 5629927 commit e84d0bd

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

physics/first_law_of_thermodynamics.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __categorize_system(argument_value: float, argument_name: str) -> None:
4949
>>> __categorize_system(10, "invalid")
5050
Traceback (most recent call last):
5151
...
52-
ValueError: Invalid argument name. Should be 'work', 'heat', or 'internal_energy_variation'.
52+
ValueError: Should be 'work', 'heat', or 'internal_energy_variation'.
5353
"""
5454

5555
if argument_name == "work":
@@ -77,9 +77,7 @@ def __categorize_system(argument_value: float, argument_name: str) -> None:
7777
print("The internal energy of the system is decreasing. It cooling down.")
7878

7979
else:
80-
error_type = "Invalid argument name."
81-
error_msg = "Should be 'work', 'heat', or 'internal_energy_variation'."
82-
raise ValueError(f"{error_type} {error_msg}")
80+
raise ValueError("Should be 'work', 'heat', or 'internal_energy_variation'.")
8381

8482
def work(heat: float, internal_energy_variation: float) -> float:
8583
"""

0 commit comments

Comments
 (0)