3 ms·
A quick easy way with python is to mess around in the interpreter 'testing'... then paste those tests in as a 'doc test'. That's the quickest way to test that
by illumen 17y ago
A quick easy way with python is to mess around in the interpreter 'testing'... then paste those tests in as a 'doc test'. That's the quickest way to test that I know of with python... and suits people who code by trying things out in the interpreter.
Another quick way is to add asserts in. It's a very easy way to sanity check things, and is usually built into the programming language (it's in C/python etc).
cu,