{"action":"created","issue":{"url":"https://api.github.com/repos/CCI-MOC/hil/issues/650","repository_url":"https://api.github.com/repos/CCI-MOC/hil","labels_url":"https://api.github.com/repos/CCI-MOC/hil/issues/650/labels{/name}","comments_url":"https://api.github.com/repos/CCI-MOC/hil/issues/650/comments","events_url":"https://api.github.com/repos/CCI-MOC/hil/issues/650/events","html_url":"https://github.com/CCI-MOC/hil/issues/650","id":175608665,"number":650,"title":"pep8 check breaks?","user":{"login":"shwsun","id":15823053,"avatar_url":"https://avatars.githubusercontent.com/u/15823053?v=3","gravatar_id":"","url":"https://api.github.com/users/shwsun","html_url":"https://github.com/shwsun","followers_url":"https://api.github.com/users/shwsun/followers","following_url":"https://api.github.com/users/shwsun/following{/other_user}","gists_url":"https://api.github.com/users/shwsun/gists{/gist_id}","starred_url":"https://api.github.com/users/shwsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shwsun/subscriptions","organizations_url":"https://api.github.com/users/shwsun/orgs","repos_url":"https://api.github.com/users/shwsun/repos","events_url":"https://api.github.com/users/shwsun/events{/privacy}","received_events_url":"https://api.github.com/users/shwsun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-07T21:16:53Z","updated_at":"2016-09-08T00:24:08Z","closed_at":null,"body":"When I run the tests by hand, I got errors like below.\r\n\r\n```sh\r\n========================================== ERRORS ===========================================\r\n_________________________________ ERROR collecting setup.py _________________________________\r\nsetup.py:98: in <module>\r\n    'lxml>=3.6.0,<4.0',\r\n/usr/lib64/python2.7/distutils/core.py:140: in setup\r\n    raise SystemExit, gen_usage(dist.script_name) + \"\\nerror: %s\" % msg\r\nE   SystemExit: usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\nE      or: -c --help [cmd1 cmd2 ...]\r\nE      or: -c --help-commands\r\nE      or: -c cmd --help\r\nE   \r\nE   error: no commands supplied\r\n________________________ ERROR collecting haas/ext/auth/keystone.py _________________________\r\nhaas/ext/auth/keystone.py:5: in <module>\r\n    from keystonemiddleware.auth_token import filter_factory\r\nE   ImportError: No module named keystonemiddleware.auth_token\r\n__________________________ ERROR collecting haas/migrations/env.py __________________________\r\nhaas/migrations/env.py:18: in <module>\r\n    config = context.config\r\nE   AttributeError: 'module' object has no attribute 'config'\r\n______________________ ERROR collecting tests/integration/keystone.py _______________________\r\ntests/integration/keystone.py:17: in <module>\r\n    from keystoneauth1.identity import v3\r\nE   ImportError: No module named keystoneauth1.identity\r\n____________________________ ERROR collecting tests/unit/cli.py _____________________________\r\nimport file mismatch:\r\nimported module 'cli' has this __file__ attribute:\r\n  /home/jethro/git/hil/tests/integration/cli.py\r\nwhich is not the same as the test file we want to collect:\r\n  /home/jethro/git/hil/tests/unit/cli.py\r\nHINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules\r\n========================================= FAILURES ==========================================\r\n________________________________________ PEP8-check _________________________________________\r\n[gw1] linux2 -- Python 2.7.5 /home/jethro/git/hil/.venv/bin/python\r\n/home/jethro/git/hil/haas/test_common.py:311:80: E501 line too long (85 > 79 characters)\r\n            nic = db.session.query(Nic).filter_by(owner=node, label='boot-nic').one()\r\n                                                                               ^\r\n\r\n======================= 1 failed, 65 passed, 5 error in 7.65 seconds ========================\r\n(.venv) [jethro@localhost: hil (master)]$ \r\n```\r\n\r\n@zenhack This raises two concerns: \r\n  1. travis is not checking pep8 right now, at least the way we want\r\n  2. should code reviewers doing these tests before giving a +1? I feel like I failed my job a little..."},"comment":{"url":"https://api.github.com/repos/CCI-MOC/hil/issues/comments/245459652","html_url":"https://github.com/CCI-MOC/hil/issues/650#issuecomment-245459652","issue_url":"https://api.github.com/repos/CCI-MOC/hil/issues/650","id":245459652,"user":{"login":"shwsun","id":15823053,"avatar_url":"https://avatars.githubusercontent.com/u/15823053?v=3","gravatar_id":"","url":"https://api.github.com/users/shwsun","html_url":"https://github.com/shwsun","followers_url":"https://api.github.com/users/shwsun/followers","following_url":"https://api.github.com/users/shwsun/following{/other_user}","gists_url":"https://api.github.com/users/shwsun/gists{/gist_id}","starred_url":"https://api.github.com/users/shwsun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shwsun/subscriptions","organizations_url":"https://api.github.com/users/shwsun/orgs","repos_url":"https://api.github.com/users/shwsun/repos","events_url":"https://api.github.com/users/shwsun/events{/privacy}","received_events_url":"https://api.github.com/users/shwsun/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T00:24:08Z","updated_at":"2016-09-08T00:24:08Z","body":" `py.test --pep8 -m pep8 *.py haas/ tests/`\r\n\r\n```sh\r\n========================================== ERRORS ==========================================\r\n________________________________ ERROR collecting setup.py _________________________________\r\nsetup.py:98: in <module>\r\n    'lxml>=3.6.0,<4.0',\r\n/usr/lib64/python2.7/distutils/core.py:139: in setup\r\n    raise SystemExit, gen_usage(dist.script_name) + \"\\nerror: %s\" % msg\r\nE   SystemExit: usage: py.test [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]\r\nE      or: py.test --help [cmd1 cmd2 ...]\r\nE      or: py.test --help-commands\r\nE      or: py.test cmd --help\r\nE   \r\nE   error: option --pep8 not recognized\r\n________________________ ERROR collecting haas/ext/auth/keystone.py ________________________\r\nhaas/ext/auth/keystone.py:5: in <module>\r\n    from keystonemiddleware.auth_token import filter_factory\r\nE   ImportError: No module named keystonemiddleware.auth_token\r\n_________________________ ERROR collecting haas/migrations/env.py __________________________\r\nhaas/migrations/env.py:18: in <module>\r\n    config = context.config\r\nE   AttributeError: 'module' object has no attribute 'config'\r\n____________________________ ERROR collecting tests/unit/cli.py ____________________________\r\nimport file mismatch:\r\nimported module 'cli' has this __file__ attribute:\r\n  /home/shwsun/coding/hil/tests/integration/cli.py\r\nwhich is not the same as the test file we want to collect:\r\n  /home/shwsun/coding/hil/tests/unit/cli.py\r\nHINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules\r\n========================================= FAILURES =========================================\r\n________________________________________ PEP8-check ________________________________________\r\n/home/shwsun/coding/hil/haas/test_common.py:311:80: E501 line too long (85 > 79 characters)\r\n            nic = db.session.query(Nic).filter_by(owner=node, label='boot-nic').one()\r\n                                                                               ^\r\n\r\n=========================== 386 tests deselected by \"-m 'pep8'\" ============================\r\n=============== 1 failed, 65 passed, 386 deselected, 4 error in 7.99 seconds ===============\r\n\r\n```\r\n\r\nAnd the python-keystoneclient is installed."}}
{"actor":{"display_login":"shwsun"}}