Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d4dd201

Browse files
committed
tests
1 parent 307de0e commit d4dd201

File tree

2 files changed

+18
-33
lines changed

2 files changed

+18
-33
lines changed

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
testpaths = tests
33
doctest_optionflags= NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL ALLOW_UNICODE ALLOW_BYTES
4+
addopts = -p no:warnings

tests/test_bots.py

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,20 @@
55
import pytest
66

77
from 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

0 commit comments

Comments
 (0)