def test_get_rows(capsys, get_rows_program): get_rows_program.run() assert capsys.readouterr()[0] == "('1985', 'Blood Meridian', 'Cormac McCarthy')\n('1851', 'Moby Dick', 'Herman Melville')\n"