GitHub PullRequestReviewCommentEvent at 2014-03-31 15:55:20
Repository: python-basics
Actor: filipovskii
Payload: {"comment":{"url":"https://api.github.com/repos/filipovskii/python-basics/pulls/comments/11122084","id":11122084,"diff_hunk":"@@ -0,0 +1,49 @@\n+'''\r\n+Created on 26 Mar 2014\r\n+\r\n+@author: paraiva\r\n+'''\r\n+__all__ = ['TestRunner']\r\n+\r\n+\r\n+class TestRunner(object):\r\n+    def __init__(self):\r\n+        self.pending_test_list = []\r\n+        self.failed_test_list = []\r\n+        self.run_test_list = []\r\n+        self.passed_test_list = []\r\n+\r\n+    def add_test(self, fn):\r\n+        self.pending_test_list.append(fn)\r\n+\r\n+    def passed_tests(self):\r\n+        return self.passed_test_list\r\n+\r\n+    def pending_tests(self):\r\n+        return self.pending_test_list\r\n+\r\n+    def ran_tests(self):\r\n+        return self.run_test_list\r\n+\r\n+    def failed_tests(self):\r\n+        return self.failed_test_list\r\n+\r\n+    def run(self):\r\n+        for i in self.pending_test_list:\r\n+            try:\r\n+                i()\r\n+            except AssertionError as er:\r\n+                print(\"An error occurred: \" + er)\r\n+                self.failed_test_list.append(i)\r\n+            finally:\r\n+                self.run_test_list.append(i)\r\n+                self.pending_test_list.remove(i)\r","path":"practice_5/ivan/test_runner.py","position":40,"original_position":40,"commit_id":"19147af75d100d09b0dc9a416635f08d139a9720","original_commit_id":"19147af75d100d09b0dc9a416635f08d139a9720","user":{"login":"filipovskii","id":610717,"avatar_url":"https://avatars.githubusercontent.com/u/610717?","gravatar_id":"839f646119eae6b67f81a5fd0e089b1e","url":"https://api.github.com/users/filipovskii","html_url":"https://github.com/filipovskii","followers_url":"https://api.github.com/users/filipovskii/followers","following_url":"https://api.github.com/users/filipovskii/following{/other_user}","gists_url":"https://api.github.com/users/filipovskii/gists{/gist_id}","starred_url":"https://api.github.com/users/filipovskii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/filipovskii/subscriptions","organizations_url":"https://api.github.com/users/filipovskii/orgs","repos_url":"https://api.github.com/users/filipovskii/repos","events_url":"https://api.github.com/users/filipovskii/events{/privacy}","received_events_url":"https://api.github.com/users/filipovskii/received_events","type":"User","site_admin":false},"body":"Снова изменение списка при итерированию и снова `except AssertionError`","created_at":"2014-03-31T15:55:20Z","updated_at":"2014-03-31T15:55:20Z","html_url":"https://github.com/filipovskii/python-basics/pull/92#discussion_r11122084","pull_request_url":"https://api.github.com/repos/filipovskii/python-basics/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/filipovskii/python-basics/pulls/comments/11122084"},"html":{"href":"https://github.com/filipovskii/python-basics/pull/92#discussion_r11122084"},"pull_request":{"href":"https://api.github.com/repos/filipovskii/python-basics/pulls/92"}}}}