{"action":"created","issue":{"url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/94","repository_url":"https://api.github.com/repos/SublimeText/UnitTesting","labels_url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/94/comments","events_url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/94/events","html_url":"https://github.com/SublimeText/UnitTesting/issues/94","id":313744914,"node_id":"MDU6SXNzdWUzMTM3NDQ5MTQ=","number":94,"title":"Using other test frameworks besides unittest?","user":{"login":"tedmiston","id":366688,"node_id":"MDQ6VXNlcjM2NjY4OA==","avatar_url":"https://avatars3.githubusercontent.com/u/366688?v=4","gravatar_id":"","url":"https://api.github.com/users/tedmiston","html_url":"https://github.com/tedmiston","followers_url":"https://api.github.com/users/tedmiston/followers","following_url":"https://api.github.com/users/tedmiston/following{/other_user}","gists_url":"https://api.github.com/users/tedmiston/gists{/gist_id}","starred_url":"https://api.github.com/users/tedmiston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tedmiston/subscriptions","organizations_url":"https://api.github.com/users/tedmiston/orgs","repos_url":"https://api.github.com/users/tedmiston/repos","events_url":"https://api.github.com/users/tedmiston/events{/privacy}","received_events_url":"https://api.github.com/users/tedmiston/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-12T14:11:55Z","updated_at":"2018-11-05T08:52:45Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I just installed UnitTesting last night and am really happy with it so far.  In my Python code outside of Sublime plugins, I like to use other frameworks that build on top of `unittest` like [pytest](https://github.com/pytest-dev/pytest) or [Parameterized](https://github.com/wolever/parameterized) to reduce the amount of boilerplate test code.\r\n\r\nIs it possible to use other frameworks besides `unittest` inside Sublime with UnitTesting?\r\n\r\nI figured this may be possible by adding the pip package go `dependencies.json` for my Sublime plugin, but I haven't found support for something like dev-only dependencies yet.  I'm wondering if you've had this use case before?"},"comment":{"url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/comments/435798043","html_url":"https://github.com/SublimeText/UnitTesting/issues/94#issuecomment-435798043","issue_url":"https://api.github.com/repos/SublimeText/UnitTesting/issues/94","id":435798043,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTc5ODA0Mw==","user":{"login":"kaste","id":8558,"node_id":"MDQ6VXNlcjg1NTg=","avatar_url":"https://avatars1.githubusercontent.com/u/8558?v=4","gravatar_id":"","url":"https://api.github.com/users/kaste","html_url":"https://github.com/kaste","followers_url":"https://api.github.com/users/kaste/followers","following_url":"https://api.github.com/users/kaste/following{/other_user}","gists_url":"https://api.github.com/users/kaste/gists{/gist_id}","starred_url":"https://api.github.com/users/kaste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaste/subscriptions","organizations_url":"https://api.github.com/users/kaste/orgs","repos_url":"https://api.github.com/users/kaste/repos","events_url":"https://api.github.com/users/kaste/events{/privacy}","received_events_url":"https://api.github.com/users/kaste/received_events","type":"User","site_admin":false},"created_at":"2018-11-05T08:52:45Z","updated_at":"2018-11-05T08:52:45Z","author_association":"CONTRIBUTOR","body":"FWIW, for pytest: Sublime uses ancient python33 so last supported version range for pytest is `3.2.x`. \r\n\r\nWhat I tried:\r\n\r\n```\r\n> pip install -t vendor pytest==3.2\r\n# Somewhere in the code\r\nimport site\r\nsite.addsitedir(SublimePackagesPath / 'UnitTesting' / 'vendor')\r\n```\r\n\r\nInvoking `pytest` basically means `import pytest; pytest.main(...)`. So this is still a black-box and they don't provide any information or support for a fine grained, customized loader. Note that `import pytest` already has side-effects, and `pytest.main` only works _once_ per python process (bc it has global side effects). a) Use multiproceesing. 👎 bc it's not supported in Sublime, b) manually cleanup the import cache (`sys.modules`-fu probably, but I didn't test that) so that python re-imports everything.\r\n\r\nOther problems:\r\n\r\n```\r\n# Sublime-surprise\r\n>>> import sys\r\n>>> sys.argv\r\nTraceback (most recent call last):\r\n  File \"<string>\", line 1, in <module>\r\nAttributeError: 'module' object has no attribute 'argv'\r\n```\r\n\r\nbut pytest expects it naturally\r\n\r\n...\r\n"}}
{"actor":{"display_login":"kaste"}}