{"action":"created","issue":{"url":"https://api.github.com/repos/mottosso/Qt.py/issues/85","repository_url":"https://api.github.com/repos/mottosso/Qt.py","labels_url":"https://api.github.com/repos/mottosso/Qt.py/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/mottosso/Qt.py/issues/85/comments","events_url":"https://api.github.com/repos/mottosso/Qt.py/issues/85/events","html_url":"https://github.com/mottosso/Qt.py/issues/85","id":168722423,"number":85,"title":"How to test docstrings of Qt.py?","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars.githubusercontent.com/u/994357?v=3","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[{"id":384651551,"url":"https://api.github.com/repos/mottosso/Qt.py/labels/feature","name":"feature","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-01T19:27:39Z","updated_at":"2016-11-25T08:43:15Z","closed_at":"2016-11-25T06:03:35Z","body":"As mentioned [here](https://github.com/mottosso/Qt.py/pull/81#issuecomment-236665431).\n\nExample:\n\n``` python\n>>> from Qt import load_ui\n>>> class MyWindow(QtWidgets.QWidget):\n...    def __init__(self, parent=None):\n...        fname = 'my_ui.ui'\n...        load_ui(fname, self)\n>>> window = MyWindow()\n```\n"},"comment":{"url":"https://api.github.com/repos/mottosso/Qt.py/issues/comments/262906790","html_url":"https://github.com/mottosso/Qt.py/issues/85#issuecomment-262906790","issue_url":"https://api.github.com/repos/mottosso/Qt.py/issues/85","id":262906790,"user":{"login":"mottosso","id":2152766,"avatar_url":"https://avatars.githubusercontent.com/u/2152766?v=3","gravatar_id":"","url":"https://api.github.com/users/mottosso","html_url":"https://github.com/mottosso","followers_url":"https://api.github.com/users/mottosso/followers","following_url":"https://api.github.com/users/mottosso/following{/other_user}","gists_url":"https://api.github.com/users/mottosso/gists{/gist_id}","starred_url":"https://api.github.com/users/mottosso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottosso/subscriptions","organizations_url":"https://api.github.com/users/mottosso/orgs","repos_url":"https://api.github.com/users/mottosso/repos","events_url":"https://api.github.com/users/mottosso/events{/privacy}","received_events_url":"https://api.github.com/users/mottosso/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T08:43:15Z","updated_at":"2016-11-25T08:43:15Z","body":"To answer the question, the trick is to make functionality that can be tested shortly.\r\n\r\nFor example, rather than a function taking a file-path, it could take the contents of a file. That would allow a doctest to pass mock contents, rather than (1) making a file on disk, (2) passing this file to the function and (3) cleaning the file up afterwards."}}
{"actor":{"display_login":"mottosso"}}