Make all tests runnable from the command line.

Also, don't compare arrays with None.  Instead, use "is"/"is not".

Fixes #470.