{"action":"created","issue":{"url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/4","labels_url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/4/comments","events_url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/4/events","html_url":"https://github.com/benjamin-hodgson/Contexts/issues/4","id":73602402,"number":4,"title":"Command Line Arguments","user":{"login":"ahmedhassanme","id":3798335,"avatar_url":"https://avatars.githubusercontent.com/u/3798335?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmedhassanme","html_url":"https://github.com/ahmedhassanme","followers_url":"https://api.github.com/users/ahmedhassanme/followers","following_url":"https://api.github.com/users/ahmedhassanme/following{/other_user}","gists_url":"https://api.github.com/users/ahmedhassanme/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmedhassanme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmedhassanme/subscriptions","organizations_url":"https://api.github.com/users/ahmedhassanme/orgs","repos_url":"https://api.github.com/users/ahmedhassanme/repos","events_url":"https://api.github.com/users/ahmedhassanme/events{/privacy}","received_events_url":"https://api.github.com/users/ahmedhassanme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-06T12:30:52Z","updated_at":"2015-05-07T09:47:44Z","closed_at":null,"body":"Hello!\r\n\r\nIt would be amazing if we were able to pass in command line arguments to 'given' functions eg\r\n\r\n`run-contexts sometest.py -x arg1 -y arg2 -z arg3`\r\n\r\nContexts is awesome."},"comment":{"url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/comments/99797128","html_url":"https://github.com/benjamin-hodgson/Contexts/issues/4#issuecomment-99797128","issue_url":"https://api.github.com/repos/benjamin-hodgson/Contexts/issues/4","id":99797128,"user":{"login":"benjamin-hodgson","id":3857587,"avatar_url":"https://avatars.githubusercontent.com/u/3857587?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamin-hodgson","html_url":"https://github.com/benjamin-hodgson","followers_url":"https://api.github.com/users/benjamin-hodgson/followers","following_url":"https://api.github.com/users/benjamin-hodgson/following{/other_user}","gists_url":"https://api.github.com/users/benjamin-hodgson/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamin-hodgson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamin-hodgson/subscriptions","organizations_url":"https://api.github.com/users/benjamin-hodgson/orgs","repos_url":"https://api.github.com/users/benjamin-hodgson/repos","events_url":"https://api.github.com/users/benjamin-hodgson/events{/privacy}","received_events_url":"https://api.github.com/users/benjamin-hodgson/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T09:47:44Z","updated_at":"2015-05-07T09:47:44Z","body":"This is do-able; the framework has to mutate `sys.argv` after it's parsed its own arguments (and probably put it back again after the tests have finished). However we need a way of separating arguments you intended to pass to `run-contexts` from arguments you intended to pass to the tests themselves, in case they use the same flags.\r\n\r\nWould something like this work for you?\r\n\r\n```bash\r\n$ run-contexts -s -v --teamcity --argv=\"-x arg1 -y arg2 -z arg3\"\r\n```\r\n\r\nIn this example `-s -v --teamcity` would be arguments for `run-contexts` itself; the things inside `--argv` would be passed through to the tests. Let me know what you think :wink: "}}