{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/385","repository_url":"https://api.github.com/repos/pytest-dev/pytest-xdist","labels_url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/385/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/385/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/385/events","html_url":"https://github.com/pytest-dev/pytest-xdist/issues/385","id":387728528,"node_id":"MDU6SXNzdWUzODc3Mjg1Mjg=","number":385,"title":"Ability to execute certain tests sequentially while using -n (xdist)","user":{"login":"cauvery","id":7635045,"node_id":"MDQ6VXNlcjc2MzUwNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/7635045?v=4","gravatar_id":"","url":"https://api.github.com/users/cauvery","html_url":"https://github.com/cauvery","followers_url":"https://api.github.com/users/cauvery/followers","following_url":"https://api.github.com/users/cauvery/following{/other_user}","gists_url":"https://api.github.com/users/cauvery/gists{/gist_id}","starred_url":"https://api.github.com/users/cauvery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cauvery/subscriptions","organizations_url":"https://api.github.com/users/cauvery/orgs","repos_url":"https://api.github.com/users/cauvery/repos","events_url":"https://api.github.com/users/cauvery/events{/privacy}","received_events_url":"https://api.github.com/users/cauvery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-05T07:32:30Z","updated_at":"2018-12-05T16:19:46Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\n\r\nI am looking for if there is a way to allow certain group of tests to run sequentially only while other tests continue to run in parallel using -n (xdist).  \r\n\r\nI have a group of tests that cannot be executed in parallel (small set of tests only in the whole).  I do not want to create another job to run without -n for these small set. I searched but did not find actual solution anywhere. \r\n\r\nThe versions I am using are:\r\npytest-xdist         1.20.1\r\npytest                   3.2.5 \r\nPython                 2.7.13\r\n\r\nThanks in advance. \r\n"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/comments/444545641","html_url":"https://github.com/pytest-dev/pytest-xdist/issues/385#issuecomment-444545641","issue_url":"https://api.github.com/repos/pytest-dev/pytest-xdist/issues/385","id":444545641,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDU0NTY0MQ==","user":{"login":"nicoddemus","id":1085180,"node_id":"MDQ6VXNlcjEwODUxODA=","avatar_url":"https://avatars2.githubusercontent.com/u/1085180?v=4","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T16:19:46Z","updated_at":"2018-12-05T16:19:46Z","author_association":"MEMBER","body":"Indeed we don't have a solution for that currently.\r\n\r\n@cauvery what we do at work is to mark some tests with a known mark (`@pytest.mark.serial`) and then execute pytest twice: once with xdist excluding the mark, and then without xdist but including the mark:\r\n\r\n```\r\n$ pytest -n auto -m \"not serial\"\r\n...\r\n$ pytest -m \"serial\"\r\n```\r\n\r\nThis way the serial-marked tests will execute sequentially in their own process. Just leaving this here in case you did not find that solution elsewhere. 👍 "}}
{"actor":{"display_login":"nicoddemus"}}