how to use capsys