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

.travis.yml: Enable travis-buddy #523

Merged
merged 1 commit into from
May 26, 2018
Merged

Conversation

manankalra
Copy link
Contributor

@manankalra manankalra commented May 2, 2018

Related to coala/meta#114

@TravisBuddy
Copy link

Travis tests have failed

Hey @manankalra,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

1st Build

python -m pytest
============================= test session starts ==============================
platform linux -- Python 3.6.3, pytest-3.3.0, py-1.5.2, pluggy-0.6.0
rootdir: /home/travis/build/coala/corobo, inifile: setup.cfg
plugins: cov-2.5.1
collected 33 items                                                             

tests/answer_test.py .                                                   [  3%]
tests/coala_lowercase_c_test.py ..                                       [  9%]
tests/coatils_test.py ...........                                        [ 42%]
tests/deprecate_bot_prefixes_test.py .                                   [ 45%]
tests/explain_test.py .                                                  [ 48%]
tests/ghetto_test.py .                                                   [ 51%]
tests/git_stats_test.py .                                                [ 54%]
tests/labhub_test.py ..F.....                                            [ 78%]
tests/lmgtfy_test.py .                                                   [ 81%]
tests/nevermind_test.py .                                                [ 84%]
tests/pitchfork_test.py .                                                [ 87%]
tests/searchdocs_test.py .                                               [ 90%]
tests/ship_it_test.py .                                                  [ 93%]
tests/the_rules_test.py .                                                [ 96%]
tests/wolfram_alpha_test.py .                                            [100%]

----------- coverage: platform linux, python 3.6.3-final-0 -----------
Name                                Stmts   Miss  Cover   Missing
-----------------------------------------------------------------
plugins/__init__.py                     0      0   100%
plugins/answer.py                      25      0   100%
plugins/coala_lowercase_c.py           12      0   100%
plugins/coatils.py                    120      0   100%
plugins/constants.py                    5      0   100%
plugins/deprecate_bot_prefixes.py       6      0   100%
plugins/explain.py                     21      0   100%
plugins/ghetto.py                      10      0   100%
plugins/git_stats.py                   51      0   100%
plugins/labhub.py                     192      1    99%   162
plugins/lmgtfy.py                       4      0   100%
plugins/nevermind.py                    5      0   100%
plugins/pitchfork.py                   12      0   100%
plugins/searchdocs.py                  16      0   100%
plugins/ship_it.py                      7      0   100%
plugins/the_rules.py                    5      0   100%
plugins/wolfram_alpha.py               18      0   100%
-----------------------------------------------------------------
TOTAL                                 509      1    99%

FAIL Required test coverage of 100% not reached. Total coverage: 99.80%

=================================== FAILURES ===================================
_______________________ TestLabHub.test_create_issue_cmd _______________________

self = <tests.labhub_test.TestLabHub testMethod=test_create_issue_cmd>

    def test_create_issue_cmd(self):
        plugins.labhub.GitHub = create_autospec(IGitt.GitHub.GitHub.GitHub)
        plugins.labhub.GitLab = create_autospec(IGitt.GitLab.GitLab.GitLab)
        plugins.labhub.GitHubToken = create_autospec(IGitt.GitHub.GitHubToken)
        plugins.labhub.GitLabPrivateToken = create_autospec(IGitt.GitLab.GitLabPrivateToken)
    
        labhub, testbot_private = plugin_testbot(
            plugins.labhub.LabHub, logging.ERROR,
            {'BACKEND': 'text', 'ACCESS_CONTROLS':{'create_issue_cmd' : {'allowprivate':False}}}
        )
        labhub.activate()
        labhub.REPOS = {'repository': self.mock_repo}
        plugins.labhub.GitHubToken.assert_called_with(None)
        plugins.labhub.GitLabPrivateToken.assert_called_with(None)
    
        # Creating issue in private chat
        testbot_private.assertCommand('!new issue repository this is the title\nbo\ndy',
>                             'You\'re not allowed')

tests/labhub_test.py:98: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <errbot.backends.test.TestBot object at 0x7f9a139081d0>
command = '!new issue repository this is the title\nbo\ndy'
response = "You're not allowed", timeout = 5

    def assertCommand(self, command, response, timeout=5):
        """Assert the given command returns the given response"""
        self.bot.push_message(command)
        msg = self.bot.pop_message(timeout)
>       assert response in msg, "'{}' not in '{}'".format(response, msg)
E       AssertionError: 'You're not allowed' not in 'Here you go: <MagicMock name='mock.create_issue().web_url' id='140299552516472'>'

../../../virtualenv/python3.6.3/lib/python3.6/site-packages/errbot/backends/test.py:457: AssertionError
----------------------------- Captured stdout call -----------------------------
DEBUG    errbot.backends.test      Merging {'BACKEND': 'text', 'ACCESS_CONTROLS': {'create_issue_cmd': {'allowprivate': False}}} to the bot config.
waiting on queue
message received
waiting on queue
message received
waiting on queue
----------------------------- Captured stderr call -----------------------------
2018-05-02 09:18:00,501 DEBUG    errbot.backends.test      Merging {'BACKEND': 'text', 'ACCESS_CONTROLS': {'create_issue_cmd': {'allowprivate': False}}} to the bot config.
------------------------------ Captured log call -------------------------------
test.py                    371 DEBUG    Merging {'BACKEND': 'text', 'ACCESS_CONTROLS': {'create_issue_cmd': {'allowprivate': False}}} to the bot config.
=============================== warnings summary ===============================
tests/answer_test.py::TestBot
  cannot collect test class 'TestBot' because it has a __init__ constructor

None
  Module already imported so can not be re-written: errbot.backends.test

tests/coatils_test.py::TestBot
  cannot collect test class 'TestBot' because it has a __init__ constructor

tests/labhub_test.py::TestBot
  cannot collect test class 'TestBot' because it has a __init__ constructor

tests/wolfram_alpha_test.py::TestBot
  cannot collect test class 'TestBot' because it has a __init__ constructor

-- Docs: http://doc.pytest.org/en/latest/warnings.html
============== 1 failed, 32 passed, 5 warnings in 149.72 seconds ===============

@jayvdb
Copy link
Member

jayvdb commented May 2, 2018

Blocked on getting travis to pass.

.travis.yml Outdated
@@ -39,5 +39,6 @@ notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/c15f764f44886af1cf87
- https://www.travisbuddy.com/
on_success: always
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we should disable this for all notifications.
Created #524 to get solved while this is blocked.

@jayvdb
Copy link
Member

jayvdb commented May 26, 2018

ack e4564d3

@jayvdb
Copy link
Member

jayvdb commented May 26, 2018

@gitmate-bot ff

@gitmate-bot
Copy link

Hey! I'm GitMate.io! This pull request is being fastforwarded automatically. Please DO NOT push while fastforward is in progress or your changes would be lost permanently ⚠️

@gitmate-bot gitmate-bot merged commit e4564d3 into coala:master May 26, 2018
@gitmate-bot
Copy link

Automated fastforward with GitMate.io was successful! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants