{"action":"created","comment":{"url":"https://api.github.com/repos/joaoventura/pylibui/pulls/comments/67728266","id":67728266,"diff_hunk":"@@ -0,0 +1,23 @@\n+\"\"\"\n+ Pylibui test suite.\n+\n+\"\"\"\n+\n+from pylibui.controls import Button\n+from tests.utils import WindowTestCase\n+\n+\n+class ButtonTest(WindowTestCase):\n+\n+    def setUp(self):\n+        super().setUp()\n+        self.button = Button('My button')\n+\n+    def test_text_attribute(self):\n+        \"\"\"Tests the button text.\"\"\"\n+        text = 'My new button'\n+        self.button.setText(text)\n+        self.assertEqual(self.button.getText(), text)\n+\n+    def test_onClick_is_called_when_user_presses_button(self):\n+        raise  # TODO: how do we simulate mouse press ?","path":"tests/test_button.py","position":23,"original_position":23,"commit_id":"5f64776a6393fe520acd1d6ef86302e949e3f5dd","original_commit_id":"5f64776a6393fe520acd1d6ef86302e949e3f5dd","user":{"login":"joaoventura","id":1718359,"avatar_url":"https://avatars.githubusercontent.com/u/1718359?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoventura","html_url":"https://github.com/joaoventura","followers_url":"https://api.github.com/users/joaoventura/followers","following_url":"https://api.github.com/users/joaoventura/following{/other_user}","gists_url":"https://api.github.com/users/joaoventura/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoventura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoventura/subscriptions","organizations_url":"https://api.github.com/users/joaoventura/orgs","repos_url":"https://api.github.com/users/joaoventura/repos","events_url":"https://api.github.com/users/joaoventura/events{/privacy}","received_events_url":"https://api.github.com/users/joaoventura/received_events","type":"User","site_admin":false},"body":"Sometimes we may need to use mock (https://docs.python.org/3/library/unittest.mock.html) to try to simulate some situations. However, in this particular case I don't know how we can use it to really press the button.","created_at":"2016-06-20T17:15:18Z","updated_at":"2016-06-20T17:15:18Z","html_url":"https://github.com/joaoventura/pylibui/pull/12#discussion_r67728266","pull_request_url":"https://api.github.com/repos/joaoventura/pylibui/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/comments/67728266"},"html":{"href":"https://github.com/joaoventura/pylibui/pull/12#discussion_r67728266"},"pull_request":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/joaoventura/pylibui/pulls/12","id":74476673,"html_url":"https://github.com/joaoventura/pylibui/pull/12","diff_url":"https://github.com/joaoventura/pylibui/pull/12.diff","patch_url":"https://github.com/joaoventura/pylibui/pull/12.patch","issue_url":"https://api.github.com/repos/joaoventura/pylibui/issues/12","number":12,"state":"open","locked":false,"title":"added tests for all widgets","user":{"login":"superzazu","id":1141722,"avatar_url":"https://avatars.githubusercontent.com/u/1141722?v=3","gravatar_id":"","url":"https://api.github.com/users/superzazu","html_url":"https://github.com/superzazu","followers_url":"https://api.github.com/users/superzazu/followers","following_url":"https://api.github.com/users/superzazu/following{/other_user}","gists_url":"https://api.github.com/users/superzazu/gists{/gist_id}","starred_url":"https://api.github.com/users/superzazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superzazu/subscriptions","organizations_url":"https://api.github.com/users/superzazu/orgs","repos_url":"https://api.github.com/users/superzazu/repos","events_url":"https://api.github.com/users/superzazu/events{/privacy}","received_events_url":"https://api.github.com/users/superzazu/received_events","type":"User","site_admin":false},"body":"Hello!\r\n\r\nI added tests for all the widgets, using the test base you implemented. That allowed me to see that two methods were missing (Control.getVisible() and Checkbox.onToggled()), and also allowed me to fix two little bugs (one `return` missing from Control.getEnabled() and a wrong call to `uiSpinboxValue ` in Spinbox.getValue()). I also removed `return` keywords in methods (in control wrappers) that don't return a value.\r\n\r\nBest regards :-)","created_at":"2016-06-20T16:56:39Z","updated_at":"2016-06-20T17:15:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ecc7653ad2727089bf4fdec500d88bc799f7f53","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joaoventura/pylibui/pulls/12/commits","review_comments_url":"https://api.github.com/repos/joaoventura/pylibui/pulls/12/comments","review_comment_url":"https://api.github.com/repos/joaoventura/pylibui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joaoventura/pylibui/issues/12/comments","statuses_url":"https://api.github.com/repos/joaoventura/pylibui/statuses/5f64776a6393fe520acd1d6ef86302e949e3f5dd","head":{"label":"superzazu:master","ref":"master","sha":"5f64776a6393fe520acd1d6ef86302e949e3f5dd","user":{"login":"superzazu","id":1141722,"avatar_url":"https://avatars.githubusercontent.com/u/1141722?v=3","gravatar_id":"","url":"https://api.github.com/users/superzazu","html_url":"https://github.com/superzazu","followers_url":"https://api.github.com/users/superzazu/followers","following_url":"https://api.github.com/users/superzazu/following{/other_user}","gists_url":"https://api.github.com/users/superzazu/gists{/gist_id}","starred_url":"https://api.github.com/users/superzazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superzazu/subscriptions","organizations_url":"https://api.github.com/users/superzazu/orgs","repos_url":"https://api.github.com/users/superzazu/repos","events_url":"https://api.github.com/users/superzazu/events{/privacy}","received_events_url":"https://api.github.com/users/superzazu/received_events","type":"User","site_admin":false},"repo":{"id":60626194,"name":"pylibui","full_name":"superzazu/pylibui","owner":{"login":"superzazu","id":1141722,"avatar_url":"https://avatars.githubusercontent.com/u/1141722?v=3","gravatar_id":"","url":"https://api.github.com/users/superzazu","html_url":"https://github.com/superzazu","followers_url":"https://api.github.com/users/superzazu/followers","following_url":"https://api.github.com/users/superzazu/following{/other_user}","gists_url":"https://api.github.com/users/superzazu/gists{/gist_id}","starred_url":"https://api.github.com/users/superzazu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superzazu/subscriptions","organizations_url":"https://api.github.com/users/superzazu/orgs","repos_url":"https://api.github.com/users/superzazu/repos","events_url":"https://api.github.com/users/superzazu/events{/privacy}","received_events_url":"https://api.github.com/users/superzazu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/superzazu/pylibui","description":"Python3 wrapper for libui","fork":true,"url":"https://api.github.com/repos/superzazu/pylibui","forks_url":"https://api.github.com/repos/superzazu/pylibui/forks","keys_url":"https://api.github.com/repos/superzazu/pylibui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/superzazu/pylibui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/superzazu/pylibui/teams","hooks_url":"https://api.github.com/repos/superzazu/pylibui/hooks","issue_events_url":"https://api.github.com/repos/superzazu/pylibui/issues/events{/number}","events_url":"https://api.github.com/repos/superzazu/pylibui/events","assignees_url":"https://api.github.com/repos/superzazu/pylibui/assignees{/user}","branches_url":"https://api.github.com/repos/superzazu/pylibui/branches{/branch}","tags_url":"https://api.github.com/repos/superzazu/pylibui/tags","blobs_url":"https://api.github.com/repos/superzazu/pylibui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/superzazu/pylibui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/superzazu/pylibui/git/refs{/sha}","trees_url":"https://api.github.com/repos/superzazu/pylibui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/superzazu/pylibui/statuses/{sha}","languages_url":"https://api.github.com/repos/superzazu/pylibui/languages","stargazers_url":"https://api.github.com/repos/superzazu/pylibui/stargazers","contributors_url":"https://api.github.com/repos/superzazu/pylibui/contributors","subscribers_url":"https://api.github.com/repos/superzazu/pylibui/subscribers","subscription_url":"https://api.github.com/repos/superzazu/pylibui/subscription","commits_url":"https://api.github.com/repos/superzazu/pylibui/commits{/sha}","git_commits_url":"https://api.github.com/repos/superzazu/pylibui/git/commits{/sha}","comments_url":"https://api.github.com/repos/superzazu/pylibui/comments{/number}","issue_comment_url":"https://api.github.com/repos/superzazu/pylibui/issues/comments{/number}","contents_url":"https://api.github.com/repos/superzazu/pylibui/contents/{+path}","compare_url":"https://api.github.com/repos/superzazu/pylibui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/superzazu/pylibui/merges","archive_url":"https://api.github.com/repos/superzazu/pylibui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/superzazu/pylibui/downloads","issues_url":"https://api.github.com/repos/superzazu/pylibui/issues{/number}","pulls_url":"https://api.github.com/repos/superzazu/pylibui/pulls{/number}","milestones_url":"https://api.github.com/repos/superzazu/pylibui/milestones{/number}","notifications_url":"https://api.github.com/repos/superzazu/pylibui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/superzazu/pylibui/labels{/name}","releases_url":"https://api.github.com/repos/superzazu/pylibui/releases{/id}","deployments_url":"https://api.github.com/repos/superzazu/pylibui/deployments","created_at":"2016-06-07T15:47:51Z","updated_at":"2016-06-07T17:19:53Z","pushed_at":"2016-06-20T16:45:25Z","git_url":"git://github.com/superzazu/pylibui.git","ssh_url":"git@github.com:superzazu/pylibui.git","clone_url":"https://github.com/superzazu/pylibui.git","svn_url":"https://github.com/superzazu/pylibui","homepage":"","size":79,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"joaoventura:master","ref":"master","sha":"4a2bdfe6046351f8db5c809e15794b50a7a0c9e9","user":{"login":"joaoventura","id":1718359,"avatar_url":"https://avatars.githubusercontent.com/u/1718359?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoventura","html_url":"https://github.com/joaoventura","followers_url":"https://api.github.com/users/joaoventura/followers","following_url":"https://api.github.com/users/joaoventura/following{/other_user}","gists_url":"https://api.github.com/users/joaoventura/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoventura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoventura/subscriptions","organizations_url":"https://api.github.com/users/joaoventura/orgs","repos_url":"https://api.github.com/users/joaoventura/repos","events_url":"https://api.github.com/users/joaoventura/events{/privacy}","received_events_url":"https://api.github.com/users/joaoventura/received_events","type":"User","site_admin":false},"repo":{"id":59297405,"name":"pylibui","full_name":"joaoventura/pylibui","owner":{"login":"joaoventura","id":1718359,"avatar_url":"https://avatars.githubusercontent.com/u/1718359?v=3","gravatar_id":"","url":"https://api.github.com/users/joaoventura","html_url":"https://github.com/joaoventura","followers_url":"https://api.github.com/users/joaoventura/followers","following_url":"https://api.github.com/users/joaoventura/following{/other_user}","gists_url":"https://api.github.com/users/joaoventura/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoventura/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoventura/subscriptions","organizations_url":"https://api.github.com/users/joaoventura/orgs","repos_url":"https://api.github.com/users/joaoventura/repos","events_url":"https://api.github.com/users/joaoventura/events{/privacy}","received_events_url":"https://api.github.com/users/joaoventura/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/joaoventura/pylibui","description":"Python3 wrapper for libui","fork":false,"url":"https://api.github.com/repos/joaoventura/pylibui","forks_url":"https://api.github.com/repos/joaoventura/pylibui/forks","keys_url":"https://api.github.com/repos/joaoventura/pylibui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joaoventura/pylibui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joaoventura/pylibui/teams","hooks_url":"https://api.github.com/repos/joaoventura/pylibui/hooks","issue_events_url":"https://api.github.com/repos/joaoventura/pylibui/issues/events{/number}","events_url":"https://api.github.com/repos/joaoventura/pylibui/events","assignees_url":"https://api.github.com/repos/joaoventura/pylibui/assignees{/user}","branches_url":"https://api.github.com/repos/joaoventura/pylibui/branches{/branch}","tags_url":"https://api.github.com/repos/joaoventura/pylibui/tags","blobs_url":"https://api.github.com/repos/joaoventura/pylibui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joaoventura/pylibui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joaoventura/pylibui/git/refs{/sha}","trees_url":"https://api.github.com/repos/joaoventura/pylibui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joaoventura/pylibui/statuses/{sha}","languages_url":"https://api.github.com/repos/joaoventura/pylibui/languages","stargazers_url":"https://api.github.com/repos/joaoventura/pylibui/stargazers","contributors_url":"https://api.github.com/repos/joaoventura/pylibui/contributors","subscribers_url":"https://api.github.com/repos/joaoventura/pylibui/subscribers","subscription_url":"https://api.github.com/repos/joaoventura/pylibui/subscription","commits_url":"https://api.github.com/repos/joaoventura/pylibui/commits{/sha}","git_commits_url":"https://api.github.com/repos/joaoventura/pylibui/git/commits{/sha}","comments_url":"https://api.github.com/repos/joaoventura/pylibui/comments{/number}","issue_comment_url":"https://api.github.com/repos/joaoventura/pylibui/issues/comments{/number}","contents_url":"https://api.github.com/repos/joaoventura/pylibui/contents/{+path}","compare_url":"https://api.github.com/repos/joaoventura/pylibui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joaoventura/pylibui/merges","archive_url":"https://api.github.com/repos/joaoventura/pylibui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joaoventura/pylibui/downloads","issues_url":"https://api.github.com/repos/joaoventura/pylibui/issues{/number}","pulls_url":"https://api.github.com/repos/joaoventura/pylibui/pulls{/number}","milestones_url":"https://api.github.com/repos/joaoventura/pylibui/milestones{/number}","notifications_url":"https://api.github.com/repos/joaoventura/pylibui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joaoventura/pylibui/labels{/name}","releases_url":"https://api.github.com/repos/joaoventura/pylibui/releases{/id}","deployments_url":"https://api.github.com/repos/joaoventura/pylibui/deployments","created_at":"2016-05-20T13:40:57Z","updated_at":"2016-06-17T12:46:54Z","pushed_at":"2016-06-20T16:56:39Z","git_url":"git://github.com/joaoventura/pylibui.git","ssh_url":"git@github.com:joaoventura/pylibui.git","clone_url":"https://github.com/joaoventura/pylibui.git","svn_url":"https://github.com/joaoventura/pylibui","homepage":"","size":92,"stargazers_count":33,"watchers_count":33,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/12"},"html":{"href":"https://github.com/joaoventura/pylibui/pull/12"},"issue":{"href":"https://api.github.com/repos/joaoventura/pylibui/issues/12"},"comments":{"href":"https://api.github.com/repos/joaoventura/pylibui/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joaoventura/pylibui/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/joaoventura/pylibui/statuses/5f64776a6393fe520acd1d6ef86302e949e3f5dd"}}}}
{"actor":{"display_login":"joaoventura"}}