{"action":"created","comment":{"url":"https://api.github.com/repos/malirod/pylua/pulls/comments/85255144","pull_request_review_id":5981167,"id":85255144,"diff_hunk":"@@ -0,0 +1,101 @@\n+#!/usr/bin/env python2\n+# -*- coding: utf-8 -*-\n+\n+import pylua.timer\n+import logging\n+import time\n+import threading\n+\n+logger = logging.getLogger(__name__)\n+\n+class TestPyTimer:\n+\t__test_timer = None\n+\t__start_timer = None\n+\t__finish_timer = None\n+\t__interval = None\n+\t__cond_var = None\n+\n+\tdef timer_task(self):\n+\t\tself.__cond_var.acquire()\n+\t\tself.__finish_timer = float(time.time())\n+\t\tself.__cond_var.notify()\n+\t\tself.__cond_var.release()\n+\t\tpass\n+\n+\tdef __init__(self):\n+\t\tself.__interval = 1\n+\t\tself.__test_timer = timer.PyTimer(self.timer_task, self.__interval)\n+\t\tself.__cond_var = threading.Condition()\n+\t\tpass\n+\n+\tdef run_cond_var(self, wait_time):\n+\t\tself.__cond_var.acquire()\n+\t\tself.__cond_var.wait(wait_time)\n+\t\tself.__cond_var.release()\n+\t\tpass\n+\n+\tdef test_run_timer(self, interval = None):","path":"pylua/test/test_timer.py","position":37,"original_position":37,"commit_id":"6c18cbbbf3d9a27b56d5310f0c0c705697a82584","original_commit_id":"6c18cbbbf3d9a27b56d5310f0c0c705697a82584","user":{"login":"malirod","id":1135245,"avatar_url":"https://avatars.githubusercontent.com/u/1135245?v=3","gravatar_id":"","url":"https://api.github.com/users/malirod","html_url":"https://github.com/malirod","followers_url":"https://api.github.com/users/malirod/followers","following_url":"https://api.github.com/users/malirod/following{/other_user}","gists_url":"https://api.github.com/users/malirod/gists{/gist_id}","starred_url":"https://api.github.com/users/malirod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malirod/subscriptions","organizations_url":"https://api.github.com/users/malirod/orgs","repos_url":"https://api.github.com/users/malirod/repos","events_url":"https://api.github.com/users/malirod/events{/privacy}","received_events_url":"https://api.github.com/users/malirod/received_events","type":"User","site_admin":false},"body":"@dtrunov, if there will be single task for many test cases, then it's good to have some external private method for task. But in this case, after you'll rework tests, I think there will be no similarity. I think there will be diffident  tasks for each test case and in this case local function for task is better since in this case test case logic is localized. Plus you don't have to imagine unique name for each task, you can use `task` name for all.","created_at":"2016-10-27T02:04:40Z","updated_at":"2016-10-27T02:04:40Z","html_url":"https://github.com/malirod/pylua/pull/16#discussion_r85255144","pull_request_url":"https://api.github.com/repos/malirod/pylua/pulls/16","_links":{"self":{"href":"https://api.github.com/repos/malirod/pylua/pulls/comments/85255144"},"html":{"href":"https://github.com/malirod/pylua/pull/16#discussion_r85255144"},"pull_request":{"href":"https://api.github.com/repos/malirod/pylua/pulls/16"}}},"pull_request":{"url":"https://api.github.com/repos/malirod/pylua/pulls/16","id":90530760,"html_url":"https://github.com/malirod/pylua/pull/16","diff_url":"https://github.com/malirod/pylua/pull/16.diff","patch_url":"https://github.com/malirod/pylua/pull/16.patch","issue_url":"https://api.github.com/repos/malirod/pylua/issues/16","number":16,"state":"open","locked":false,"title":"[WIP]Feature/timer","user":{"login":"dtrunov","id":11158877,"avatar_url":"https://avatars.githubusercontent.com/u/11158877?v=3","gravatar_id":"","url":"https://api.github.com/users/dtrunov","html_url":"https://github.com/dtrunov","followers_url":"https://api.github.com/users/dtrunov/followers","following_url":"https://api.github.com/users/dtrunov/following{/other_user}","gists_url":"https://api.github.com/users/dtrunov/gists{/gist_id}","starred_url":"https://api.github.com/users/dtrunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtrunov/subscriptions","organizations_url":"https://api.github.com/users/dtrunov/orgs","repos_url":"https://api.github.com/users/dtrunov/repos","events_url":"https://api.github.com/users/dtrunov/events{/privacy}","received_events_url":"https://api.github.com/users/dtrunov/received_events","type":"User","site_admin":false},"body":"Create timer based on python timer and add UT for timer.","created_at":"2016-10-23T21:36:43Z","updated_at":"2016-10-27T02:04:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"026c9724c768386fe22ad6dfcf3068cb64157353","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/malirod/pylua/pulls/16/commits","review_comments_url":"https://api.github.com/repos/malirod/pylua/pulls/16/comments","review_comment_url":"https://api.github.com/repos/malirod/pylua/pulls/comments{/number}","comments_url":"https://api.github.com/repos/malirod/pylua/issues/16/comments","statuses_url":"https://api.github.com/repos/malirod/pylua/statuses/6c18cbbbf3d9a27b56d5310f0c0c705697a82584","head":{"label":"dtrunov:feature/timer","ref":"feature/timer","sha":"6c18cbbbf3d9a27b56d5310f0c0c705697a82584","user":{"login":"dtrunov","id":11158877,"avatar_url":"https://avatars.githubusercontent.com/u/11158877?v=3","gravatar_id":"","url":"https://api.github.com/users/dtrunov","html_url":"https://github.com/dtrunov","followers_url":"https://api.github.com/users/dtrunov/followers","following_url":"https://api.github.com/users/dtrunov/following{/other_user}","gists_url":"https://api.github.com/users/dtrunov/gists{/gist_id}","starred_url":"https://api.github.com/users/dtrunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtrunov/subscriptions","organizations_url":"https://api.github.com/users/dtrunov/orgs","repos_url":"https://api.github.com/users/dtrunov/repos","events_url":"https://api.github.com/users/dtrunov/events{/privacy}","received_events_url":"https://api.github.com/users/dtrunov/received_events","type":"User","site_admin":false},"repo":{"id":71392232,"name":"pylua","full_name":"dtrunov/pylua","owner":{"login":"dtrunov","id":11158877,"avatar_url":"https://avatars.githubusercontent.com/u/11158877?v=3","gravatar_id":"","url":"https://api.github.com/users/dtrunov","html_url":"https://github.com/dtrunov","followers_url":"https://api.github.com/users/dtrunov/followers","following_url":"https://api.github.com/users/dtrunov/following{/other_user}","gists_url":"https://api.github.com/users/dtrunov/gists{/gist_id}","starred_url":"https://api.github.com/users/dtrunov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dtrunov/subscriptions","organizations_url":"https://api.github.com/users/dtrunov/orgs","repos_url":"https://api.github.com/users/dtrunov/repos","events_url":"https://api.github.com/users/dtrunov/events{/privacy}","received_events_url":"https://api.github.com/users/dtrunov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dtrunov/pylua","description":"Example of binding between python and lua","fork":true,"url":"https://api.github.com/repos/dtrunov/pylua","forks_url":"https://api.github.com/repos/dtrunov/pylua/forks","keys_url":"https://api.github.com/repos/dtrunov/pylua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dtrunov/pylua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dtrunov/pylua/teams","hooks_url":"https://api.github.com/repos/dtrunov/pylua/hooks","issue_events_url":"https://api.github.com/repos/dtrunov/pylua/issues/events{/number}","events_url":"https://api.github.com/repos/dtrunov/pylua/events","assignees_url":"https://api.github.com/repos/dtrunov/pylua/assignees{/user}","branches_url":"https://api.github.com/repos/dtrunov/pylua/branches{/branch}","tags_url":"https://api.github.com/repos/dtrunov/pylua/tags","blobs_url":"https://api.github.com/repos/dtrunov/pylua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dtrunov/pylua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dtrunov/pylua/git/refs{/sha}","trees_url":"https://api.github.com/repos/dtrunov/pylua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dtrunov/pylua/statuses/{sha}","languages_url":"https://api.github.com/repos/dtrunov/pylua/languages","stargazers_url":"https://api.github.com/repos/dtrunov/pylua/stargazers","contributors_url":"https://api.github.com/repos/dtrunov/pylua/contributors","subscribers_url":"https://api.github.com/repos/dtrunov/pylua/subscribers","subscription_url":"https://api.github.com/repos/dtrunov/pylua/subscription","commits_url":"https://api.github.com/repos/dtrunov/pylua/commits{/sha}","git_commits_url":"https://api.github.com/repos/dtrunov/pylua/git/commits{/sha}","comments_url":"https://api.github.com/repos/dtrunov/pylua/comments{/number}","issue_comment_url":"https://api.github.com/repos/dtrunov/pylua/issues/comments{/number}","contents_url":"https://api.github.com/repos/dtrunov/pylua/contents/{+path}","compare_url":"https://api.github.com/repos/dtrunov/pylua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dtrunov/pylua/merges","archive_url":"https://api.github.com/repos/dtrunov/pylua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dtrunov/pylua/downloads","issues_url":"https://api.github.com/repos/dtrunov/pylua/issues{/number}","pulls_url":"https://api.github.com/repos/dtrunov/pylua/pulls{/number}","milestones_url":"https://api.github.com/repos/dtrunov/pylua/milestones{/number}","notifications_url":"https://api.github.com/repos/dtrunov/pylua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dtrunov/pylua/labels{/name}","releases_url":"https://api.github.com/repos/dtrunov/pylua/releases{/id}","deployments_url":"https://api.github.com/repos/dtrunov/pylua/deployments","created_at":"2016-10-19T19:30:22Z","updated_at":"2016-10-19T19:30:23Z","pushed_at":"2016-10-23T21:34:56Z","git_url":"git://github.com/dtrunov/pylua.git","ssh_url":"git@github.com:dtrunov/pylua.git","clone_url":"https://github.com/dtrunov/pylua.git","svn_url":"https://github.com/dtrunov/pylua","homepage":null,"size":42,"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":"malirod:develop","ref":"develop","sha":"cd9d54f79e210959f63f7019a4acc9139e924065","user":{"login":"malirod","id":1135245,"avatar_url":"https://avatars.githubusercontent.com/u/1135245?v=3","gravatar_id":"","url":"https://api.github.com/users/malirod","html_url":"https://github.com/malirod","followers_url":"https://api.github.com/users/malirod/followers","following_url":"https://api.github.com/users/malirod/following{/other_user}","gists_url":"https://api.github.com/users/malirod/gists{/gist_id}","starred_url":"https://api.github.com/users/malirod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malirod/subscriptions","organizations_url":"https://api.github.com/users/malirod/orgs","repos_url":"https://api.github.com/users/malirod/repos","events_url":"https://api.github.com/users/malirod/events{/privacy}","received_events_url":"https://api.github.com/users/malirod/received_events","type":"User","site_admin":false},"repo":{"id":67381714,"name":"pylua","full_name":"malirod/pylua","owner":{"login":"malirod","id":1135245,"avatar_url":"https://avatars.githubusercontent.com/u/1135245?v=3","gravatar_id":"","url":"https://api.github.com/users/malirod","html_url":"https://github.com/malirod","followers_url":"https://api.github.com/users/malirod/followers","following_url":"https://api.github.com/users/malirod/following{/other_user}","gists_url":"https://api.github.com/users/malirod/gists{/gist_id}","starred_url":"https://api.github.com/users/malirod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malirod/subscriptions","organizations_url":"https://api.github.com/users/malirod/orgs","repos_url":"https://api.github.com/users/malirod/repos","events_url":"https://api.github.com/users/malirod/events{/privacy}","received_events_url":"https://api.github.com/users/malirod/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/malirod/pylua","description":"Example of binding between python and lua","fork":false,"url":"https://api.github.com/repos/malirod/pylua","forks_url":"https://api.github.com/repos/malirod/pylua/forks","keys_url":"https://api.github.com/repos/malirod/pylua/keys{/key_id}","collaborators_url":"https://api.github.com/repos/malirod/pylua/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/malirod/pylua/teams","hooks_url":"https://api.github.com/repos/malirod/pylua/hooks","issue_events_url":"https://api.github.com/repos/malirod/pylua/issues/events{/number}","events_url":"https://api.github.com/repos/malirod/pylua/events","assignees_url":"https://api.github.com/repos/malirod/pylua/assignees{/user}","branches_url":"https://api.github.com/repos/malirod/pylua/branches{/branch}","tags_url":"https://api.github.com/repos/malirod/pylua/tags","blobs_url":"https://api.github.com/repos/malirod/pylua/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/malirod/pylua/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/malirod/pylua/git/refs{/sha}","trees_url":"https://api.github.com/repos/malirod/pylua/git/trees{/sha}","statuses_url":"https://api.github.com/repos/malirod/pylua/statuses/{sha}","languages_url":"https://api.github.com/repos/malirod/pylua/languages","stargazers_url":"https://api.github.com/repos/malirod/pylua/stargazers","contributors_url":"https://api.github.com/repos/malirod/pylua/contributors","subscribers_url":"https://api.github.com/repos/malirod/pylua/subscribers","subscription_url":"https://api.github.com/repos/malirod/pylua/subscription","commits_url":"https://api.github.com/repos/malirod/pylua/commits{/sha}","git_commits_url":"https://api.github.com/repos/malirod/pylua/git/commits{/sha}","comments_url":"https://api.github.com/repos/malirod/pylua/comments{/number}","issue_comment_url":"https://api.github.com/repos/malirod/pylua/issues/comments{/number}","contents_url":"https://api.github.com/repos/malirod/pylua/contents/{+path}","compare_url":"https://api.github.com/repos/malirod/pylua/compare/{base}...{head}","merges_url":"https://api.github.com/repos/malirod/pylua/merges","archive_url":"https://api.github.com/repos/malirod/pylua/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/malirod/pylua/downloads","issues_url":"https://api.github.com/repos/malirod/pylua/issues{/number}","pulls_url":"https://api.github.com/repos/malirod/pylua/pulls{/number}","milestones_url":"https://api.github.com/repos/malirod/pylua/milestones{/number}","notifications_url":"https://api.github.com/repos/malirod/pylua/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/malirod/pylua/labels{/name}","releases_url":"https://api.github.com/repos/malirod/pylua/releases{/id}","deployments_url":"https://api.github.com/repos/malirod/pylua/deployments","created_at":"2016-09-05T02:34:14Z","updated_at":"2016-09-08T06:21:22Z","pushed_at":"2016-10-23T21:36:43Z","git_url":"git://github.com/malirod/pylua.git","ssh_url":"git@github.com:malirod/pylua.git","clone_url":"https://github.com/malirod/pylua.git","svn_url":"https://github.com/malirod/pylua","homepage":null,"size":40,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":8,"forks":6,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/malirod/pylua/pulls/16"},"html":{"href":"https://github.com/malirod/pylua/pull/16"},"issue":{"href":"https://api.github.com/repos/malirod/pylua/issues/16"},"comments":{"href":"https://api.github.com/repos/malirod/pylua/issues/16/comments"},"review_comments":{"href":"https://api.github.com/repos/malirod/pylua/pulls/16/comments"},"review_comment":{"href":"https://api.github.com/repos/malirod/pylua/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/malirod/pylua/pulls/16/commits"},"statuses":{"href":"https://api.github.com/repos/malirod/pylua/statuses/6c18cbbbf3d9a27b56d5310f0c0c705697a82584"}}}}
{"actor":{"display_login":"malirod"}}