Make ipythonprinting test more robust