STY: Fix style in tests and idwtn

Fix style as suggested by @ankit-maverick. Imports according to PEP8,
one newline between function definitions line length and spaces around
arithmetic operators.