import pytest from click.testing import CliRunner from bukuserver import server @pytest.mark.parametrize( 'args,word', [ ('--help', 'bukuserver'), ('--version', 'Buku') ] ) def test_cli(args, word): runner = CliRunner() result = runner.invoke(server.cli, [args]) assert result.exit_code == 0 assert word in result.output