Update tests.py with most of new API,

Having trouble with the last ones. I want to split these into separate
scripts in the test/ directory, but I can't seem to import linescan from
the root.