Fix tests

Sadly, we cannot read from a write pipe.
Also, not is not a function in python