Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
shortening Python code
#13
(Oct-23-2022, 07:01 AM)ndc85430 Wrote: but all those tests do is check that no exception is thrown by the functions.
indeed, those would be poor tests. poor, at a minimum. or possibly outright wrong.

the test for celcius_to_fahrenheit() certainly must not raise an exception for valid cases. but it must also perform the correct calculations in all the value types intended to be supported which should include all non-complex numeric types that can represent temperature.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
shortening Python code - by Skaperen - Oct-13-2022, 11:42 PM
RE: shortening Python code - by Larz60+ - Oct-14-2022, 03:07 AM
RE: shortening Python code - by Gribouillis - Oct-14-2022, 04:50 AM
RE: shortening Python code - by DeaD_EyE - Oct-14-2022, 08:13 AM
RE: shortening Python code - by snippsat - Oct-14-2022, 11:41 AM
RE: shortening Python code - by Skaperen - Oct-14-2022, 10:49 PM
RE: shortening Python code - by ndc85430 - Oct-15-2022, 04:14 AM
RE: shortening Python code - by Skaperen - Oct-15-2022, 10:33 PM
RE: shortening Python code - by Gribouillis - Oct-15-2022, 02:53 PM
RE: shortening Python code - by Skaperen - Oct-15-2022, 10:23 PM
RE: shortening Python code - by ndc85430 - Oct-23-2022, 07:01 AM
RE: shortening Python code - by wavic - Oct-23-2022, 08:53 AM
RE: shortening Python code - by Skaperen - Oct-23-2022, 10:54 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020