{"action":"created","issue":{"url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/40","repository_url":"https://api.github.com/repos/MarekSuchanek/labelord_tests","labels_url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/40/comments","events_url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/40/events","html_url":"https://github.com/MarekSuchanek/labelord_tests/issues/40","id":275104551,"number":40,"title":"Test fails pri python setup.py test","user":{"login":"HalfDeadPie","id":17759203,"avatar_url":"https://avatars0.githubusercontent.com/u/17759203?v=4","gravatar_id":"","url":"https://api.github.com/users/HalfDeadPie","html_url":"https://github.com/HalfDeadPie","followers_url":"https://api.github.com/users/HalfDeadPie/followers","following_url":"https://api.github.com/users/HalfDeadPie/following{/other_user}","gists_url":"https://api.github.com/users/HalfDeadPie/gists{/gist_id}","starred_url":"https://api.github.com/users/HalfDeadPie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HalfDeadPie/subscriptions","organizations_url":"https://api.github.com/users/HalfDeadPie/orgs","repos_url":"https://api.github.com/users/HalfDeadPie/repos","events_url":"https://api.github.com/users/HalfDeadPie/events{/privacy}","received_events_url":"https://api.github.com/users/HalfDeadPie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-18T19:46:39Z","updated_at":"2017-11-18T19:54:26Z","closed_at":null,"author_association":"NONE","body":"Dobry den,\r\nchcel by som sa spytat aky moze byt dovod, ze pri testovani `python setup.py test` failuju testy, ktore pri testovani `python -m pytest` nefailuju.\r\nNapriklad samostatne pomocou `python -m pytest tests_cli/` testy prejdu ale pri `python setup.py test` vacsina z nich failuje.\r\n\r\nhttps://github.com/HalfDeadPie/labelord_test\r\n\r\nDakujem"},"comment":{"url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/comments/345466892","html_url":"https://github.com/MarekSuchanek/labelord_tests/issues/40#issuecomment-345466892","issue_url":"https://api.github.com/repos/MarekSuchanek/labelord_tests/issues/40","id":345466892,"user":{"login":"hroncok","id":2401856,"avatar_url":"https://avatars2.githubusercontent.com/u/2401856?v=4","gravatar_id":"","url":"https://api.github.com/users/hroncok","html_url":"https://github.com/hroncok","followers_url":"https://api.github.com/users/hroncok/followers","following_url":"https://api.github.com/users/hroncok/following{/other_user}","gists_url":"https://api.github.com/users/hroncok/gists{/gist_id}","starred_url":"https://api.github.com/users/hroncok/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hroncok/subscriptions","organizations_url":"https://api.github.com/users/hroncok/orgs","repos_url":"https://api.github.com/users/hroncok/repos","events_url":"https://api.github.com/users/hroncok/events{/privacy}","received_events_url":"https://api.github.com/users/hroncok/received_events","type":"User","site_admin":false},"created_at":"2017-11-18T19:54:26Z","updated_at":"2017-11-18T19:54:26Z","author_association":"COLLABORATOR","body":"Protože `python setup.py test` pouští `python -m pytest` bez argumentů a tudíž se kolektují všechny testy: `tests_cli`, `tests_web`, `tests_module`, `test_unit`... A v některých těch složkách je `conftest.py` - pytest najde ten první a použije ho, tím rozbije testy v jiných adresářích (hlavně kvůli jiné lokaci kazet).\r\n\r\nExistuje několik řešení:\r\n\r\n * (nejjednoduší) odendat naše testy z repa a mít tam jenom ty svoje\r\n * (polovičaté) nastavit v `pytest.ini`, že se mají pouštět jen testy ve složce `tests`:\r\n    ```ini\r\n    [pytest]\r\n    norecursedirs = __venv__ .eggs .tox ...\r\n    addopts = test -v ...\r\n    ```\r\n * (nejlepší, trochu pracnější) přebagrovat testy tak, aby měly společnou lokaci kazet a udělat ruční merge různých (ale téměř stejných) `conftest.py`"}}
{"actor":{"display_login":"hroncok"}}