Output capture and assert rewrite not work on ipy