File tree Expand file tree Collapse file tree 2 files changed +18
-33
lines changed Expand file tree Collapse file tree 2 files changed +18
-33
lines changed Original file line number Diff line number Diff line change 11[pytest]
22testpaths = tests
33doctest_optionflags = NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES
4+ addopts = -p no:warnings
Original file line number Diff line number Diff line change 55import pytest
66
77from click .testing import CliRunner
8-
9- from codebots .cli import cli
10-
11-
12- # @pytest.fixture
13- # def response():
14- # """Sample pytest fixture.
15-
16- # See more at: http://doc.pytest.org/en/latest/fixture.html
17- # """
18- # # import requests
19- # # return requests.get('https://github.com/audreyr/cookiecutter-pypackage')
20-
21-
22- # def test_content(response):
23- # """Sample pytest test function with the pytest fixture as an argument."""
24- # # from bs4 import BeautifulSoup
25- # # assert 'GitHub' in BeautifulSoup(response.content).title.string
26-
27-
28- # def test_command_line_interface():
29- # """Test the CLI."""
30- # runner = CliRunner()
31- # result = runner.invoke(cli.main)
32- # assert result.exit_code == 0
33- # assert 'codebots.cli.main' in result.output
34- # help_result = runner.invoke(cli.main, ['--help'])
35- # assert help_result.exit_code == 0
36- # assert '--help Show this message and exit.' in help_result.output
37-
38-
39- def test_dummy ():
40- assert True
8+ import codebots .cli .cli
9+
10+ bots = ['main' ,
11+ 'latexbot' ,
12+ 'sshbot' ,
13+ 'deploybot' ,
14+ 'drivebot' ,
15+ 'telebot' ,
16+ 'slackbot' ,
17+ 'emailbot' ]
18+
19+
20+ def test_bots ():
21+ for bot in bots :
22+ runner = CliRunner ()
23+ result = runner .invoke (getattr (codebots .cli .cli , bot ))
24+ assert result .exit_code == 0
You can’t perform that action at this time.
0 commit comments