Tagged in

Negative Testing

New Light Technologies, Inc. (NLT
New Light Technologies, Inc. (NLT
New Light Technologies (NLT) provides enterprise information solutions that combine Information Technology (IT) ingenuity and industry intelligence to drive high-performance results for our clients. We help commercial companies and governments at the federal, state, and local
More information
Followers
23
Elsewhere
More, on Medium

Basic Negative Testing

In part one, we started writing a factorial function in the test-driven style. We depend on the humble “assert” statement to run our tests and we ended with this:

def factorial(n):
return n * factorial(n-1) if n else 1