Assertion => is a sanity -check that you can turn on or turn off when you have finished testing the program.
Programmers often placed assertions at the start of a function to check for valid input.
and after a function call to check for valid output.
The assert can take a second argument that is passed to the Assertion Error raised if the assertion fails.
No comments:
Post a Comment