convert tests to unittest and add TAP support (if tappy is available)