{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/1189","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1189/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1189/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1189/events","html_url":"https://github.com/pytest-dev/pytest/issues/1189","id":118600378,"number":1189,"title":"Pytest ignores '.ini' file in subdirectory when run with '-n'","user":{"login":"allanlewis","id":194736,"avatar_url":"https://avatars.githubusercontent.com/u/194736?v=3","gravatar_id":"","url":"https://api.github.com/users/allanlewis","html_url":"https://github.com/allanlewis","followers_url":"https://api.github.com/users/allanlewis/followers","following_url":"https://api.github.com/users/allanlewis/following{/other_user}","gists_url":"https://api.github.com/users/allanlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/allanlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanlewis/subscriptions","organizations_url":"https://api.github.com/users/allanlewis/orgs","repos_url":"https://api.github.com/users/allanlewis/repos","events_url":"https://api.github.com/users/allanlewis/events{/privacy}","received_events_url":"https://api.github.com/users/allanlewis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-24T12:38:39Z","updated_at":"2015-11-24T12:48:59Z","closed_at":null,"body":"I've noticed some strange behaviour with regard to `pytest.ini` files when those files are in a subdirectory. When I run `py.test` with `-n` (with any value, including '0'), the `pytest.ini` in the subdirectory is completely ignored. The following shell session replicates the error:\r\n```sh\r\n$ cd $(mktemp -d)\r\n$ mkdir tests\r\n$ ( cd tests && wget --quiet https://gist.github.com/allanlewis/3429d6dfd15738eabae0/raw/9a1cdd27d56e32d6dfb33013e7f67fcb58c3284b/pytest.ini https://gist.githubusercontent.com/allanlewis/3429d6dfd15738eabae0/raw/de09d81d723c898fa9b7d54b24b370725dab1464/test_things.py )\r\n$ cat tests/test_things.py\r\nimport pytest\r\n@pytest.mark.onlythis\r\ndef test_should_run():\r\n    pass\r\ndef test_should_not_run():\r\n    pass\r\n$ cat tests/pytest.ini \r\n[pytest]\r\naddopts = -m \"onlythis\"\r\n$ py.test -v tests\r\n========================================= test session starts =========================================\r\nplatform linux2 -- Python 2.7.8, pytest-2.8.3, py-1.4.30, pluggy-0.3.1 -- /usr/bin/python\r\ncachedir: tests/.cache\r\nrootdir: /tmp/tmp.jMcnQhurH3/tests, inifile: pytest.ini\r\nplugins: xdist-1.13.1, mock-0.8.1, html-1.7\r\ncollected 2 items \r\n\r\ntests/test_things.py::test_should_run PASSED\r\n\r\n================================ 1 tests deselected by \"-m 'onlythis'\" ================================\r\n=============================== 1 passed, 1 deselected in 0.00 seconds ================================\r\n$ py.test -v -n auto tests\r\n========================================= test session starts =========================================\r\nplatform linux2 -- Python 2.7.8, pytest-2.8.3, py-1.4.30, pluggy-0.3.1 -- /usr/bin/python\r\ncachedir: .cache\r\nrootdir: /tmp/tmp.jMcnQhurH3, inifile: \r\nplugins: xdist-1.13.1, mock-0.8.1, html-1.7\r\n[gw0] linux2 Python 2.7.8 cwd: /tmp/tmp.jMcnQhurH3\r\n[gw1] linux2 Python 2.7.8 cwd: /tmp/tmp.jMcnQhurH3\r\n[gw2] linux2 Python 2.7.8 cwd: /tmp/tmp.jMcnQhurH3\r\n[gw3] linux2 Python 2.7.8 cwd: /tmp/tmp.jMcnQhurH3\r\n[gw1] Python 2.7.8 (default, Sep 24 2015, 18:26:19)  -- [GCC 4.9.2 20150212 (Red Hat 4.9.2-6)]\r\n[gw0] Python 2.7.8 (default, Sep 24 2015, 18:26:19)  -- [GCC 4.9.2 20150212 (Red Hat 4.9.2-6)]\r\n[gw2] Python 2.7.8 (default, Sep 24 2015, 18:26:19)  -- [GCC 4.9.2 20150212 (Red Hat 4.9.2-6)]\r\n[gw3] Python 2.7.8 (default, Sep 24 2015, 18:26:19)  -- [GCC 4.9.2 20150212 (Red Hat 4.9.2-6)]\r\ngw0 [2] / gw1 [2] / gw2 [2] / gw3 [2]\r\nscheduling tests via LoadScheduling\r\n\r\ntest_things.py::test_should_run \r\n[gw3] PASSED test_things.py::test_should_run \r\ntest_things.py::test_should_not_run \r\n[gw3] PASSED test_things.py::test_should_not_run \r\n\r\n====================================== 2 passed in 0.47 seconds =======================================\r\n$ py.test -v -n 0 tests   \r\n========================================= test session starts =========================================\r\nplatform linux2 -- Python 2.7.8, pytest-2.8.3, py-1.4.30, pluggy-0.3.1 -- /usr/bin/python\r\ncachedir: .cache\r\nrootdir: /tmp/tmp.jMcnQhurH3, inifile: \r\nplugins: xdist-1.13.1, mock-0.8.1, html-1.7\r\ncollected 2 items \r\n\r\ntests/test_things.py::test_should_run PASSED\r\ntests/test_things.py::test_should_not_run PASSED\r\n\r\n====================================== 2 passed in 0.00 seconds =======================================\r\n```"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/159257816","html_url":"https://github.com/pytest-dev/pytest/issues/1189#issuecomment-159257816","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/1189","id":159257816,"user":{"login":"allanlewis","id":194736,"avatar_url":"https://avatars.githubusercontent.com/u/194736?v=3","gravatar_id":"","url":"https://api.github.com/users/allanlewis","html_url":"https://github.com/allanlewis","followers_url":"https://api.github.com/users/allanlewis/followers","following_url":"https://api.github.com/users/allanlewis/following{/other_user}","gists_url":"https://api.github.com/users/allanlewis/gists{/gist_id}","starred_url":"https://api.github.com/users/allanlewis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allanlewis/subscriptions","organizations_url":"https://api.github.com/users/allanlewis/orgs","repos_url":"https://api.github.com/users/allanlewis/repos","events_url":"https://api.github.com/users/allanlewis/events{/privacy}","received_events_url":"https://api.github.com/users/allanlewis/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T12:48:59Z","updated_at":"2015-11-24T12:48:59Z","body":"Sorry, I meant to raise this in `pytest-xdist`! See https://github.com/pytest-dev/pytest-xdist/issues/14."}}