def test_banner_alternative_stream(mocked_print, repl: Riposte): repl.banner = "foobar" repl.print_banner = False repl._process = mock.Mock(side_effect=StopIteration) repl.parse_cli_arguments = mock.Mock() repl.run() mocked_print.assert_not_called()
def test_banner(mocked_print, repl: Riposte): repl.banner = "foobar" repl.print_banner = True repl._process = mock.Mock(side_effect=StopIteration) repl.parse_cli_arguments = mock.Mock() repl.run() mocked_print.assert_called_once_with(repl.banner)