Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テストカバレッジを出したい #133

Open
Goryudyuma opened this issue Jun 6, 2020 · 1 comment
Open

テストカバレッジを出したい #133

Goryudyuma opened this issue Jun 6, 2020 · 1 comment

Comments

@Goryudyuma
Copy link
Member

どんどんテスト書いていくモチベーションになるように

@Goryudyuma
Copy link
Member Author


$ pytest --ignore=setup -v --cov='.'
======================================================================================================================= test session starts =======================================================================================================================
platform linux -- Python 3.8.2, pytest-5.4.3, py-1.8.1, pluggy-0.13.1 -- /home/goryudyuma/.local/share/virtualenvs/hato-bot-iqtiCmky/bin/python
cachedir: .pytest_cache
rootdir: /home/goryudyuma/go/src/github.com/nakkaa/hato-bot
plugins: cov-2.9.0
collected 11 items                                                                                                                                                                                                                                                

tests/library/test_hatokaraage.py::TestHatoHaKaraage::test_include_hato PASSED                                                                                                                                                                              [  9%]
tests/library/test_hatokaraage.py::TestHatoHaKaraage::test_normal PASSED                                                                                                                                                                                    [ 18%]
tests/plugins/test_hato.py::TestRespondToWithSpace::test_flag PASSED                                                                                                                                                                                        [ 27%]
tests/plugins/test_hato.py::TestRespondToWithSpace::test_normal PASSED                                                                                                                                                                                      [ 36%]
tests/plugins/test_hato.py::TestSplitCommand::test_hankaku_and_zenkaku_space PASSED                                                                                                                                                                         [ 45%]
tests/plugins/test_hato.py::TestSplitCommand::test_last_hankaku_space PASSED                                                                                                                                                                                [ 54%]
tests/plugins/test_hato.py::TestSplitCommand::test_last_zenkaku_space PASSED                                                                                                                                                                                [ 63%]
tests/plugins/test_hato.py::TestSplitCommand::test_maxsplit PASSED                                                                                                                                                                                          [ 72%]
tests/plugins/test_hato.py::TestSplitCommand::test_only_hankaku_space PASSED                                                                                                                                                                                [ 81%]
tests/plugins/test_hato.py::TestSplitCommand::test_only_zenkaku_space PASSED                                                                                                                                                                                [ 90%]
tests/plugins/test_hato.py::TestSplitCommand::test_zenkaku_and_hankaku_space PASSED                                                                                                                                                                         [100%]

======================================================================================================================== warnings summary =========================================================================================================================
/home/goryudyuma/.local/share/virtualenvs/hato-bot-iqtiCmky/lib/python3.8/site-packages/slackbot/bot.py:3
  /home/goryudyuma/.local/share/virtualenvs/hato-bot-iqtiCmky/lib/python3.8/site-packages/slackbot/bot.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/latest/warnings.html

----------- coverage: platform linux, python 3.8.2-final-0 -----------
Name                                 Stmts   Miss  Cover
--------------------------------------------------------
create_env.py                           31     31     0%
library/__init__.py                      0      0   100%
library/earthquake.py                   36     30    17%
library/hatokaraage.py                   4      0   100%
library/hukidasi.py                     36     31    14%
library/labotter.py                     88     72    18%
library/vocabularydb.py                 91     76    16%
library/weather.py                      24     17    29%
plugins/__init__.py                      0      0   100%
plugins/hato.py                        148     97    34%
run.py                                  13     13     0%
slackbot_settings.py                    17      0   100%
tests/__init__.py                        0      0   100%
tests/library/__init__.py                0      0   100%
tests/library/test_earthquake.py         0      0   100%
tests/library/test_hatokaraage.py        9      1    89%
tests/library/test_hukidasi.py           0      0   100%
tests/library/test_labotter.py           0      0   100%
tests/library/test_vocabularydb.py       0      0   100%
tests/library/test_weather.py            0      0   100%
tests/plugins/__init__.py                0      0   100%
tests/plugins/test_hato.py              39      1    97%
tests/test_create_env.py                 0      0   100%
tests/test_run.py                        0      0   100%
tests/test_slackbot_settings.py          0      0   100%
--------------------------------------------------------
TOTAL                                  536    369    31%

================================================================================================================== 11 passed, 1 warning in 0.30s ==================================================================================================================

軽く出してみた

@massongit massongit moved this to In Progress in task list Sep 24, 2022
@massongit massongit removed the status in task list Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant