GitHub PullRequestReviewCommentEvent at 2014-04-22 18:47:01
Repository: autotest-docker
Actor: cevich
Payload: {"comment":{"url":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments/11869291","id":11869291,"diff_hunk":"@@ -0,0 +1,74 @@\n+\"\"\"\n+Test output of docker diff command\n+\n+1. Modify a file in a docker image\n+2. Run docker diff on resultant container\n+3. Check output against expected changes\n+\"\"\"\n+\n+# Okay to be less-strict for these cautions/warnings in subtests\n+# pylint: disable=C0103,C0111,R0904,C0103\n+\n+from autotest.client import utils\n+from dockertest.dockercmd import DockerCmd\n+from dockertest.dockercmd import NoFailDockerCmd\n+from dockertest.images import DocdokerImage\n+from dockertest.subtest import SubSubtest\n+from dockertest.subtest import SubSubtestCaller\n+import os\n+\n+class diff(SubSubtestCaller):\n+    config_section = 'docker_cli/diff'\n+\n+class diff_base(SubSubtest):\n+    @staticmethod\n+    def parse_diff_output(output):\n+        return dict([(y[1], y[0]) for y in\n+                    [x.split() for x in output.split('\\n') if x]])","path":"subtests/docker_cli/diff/diff.py","position":27,"original_position":27,"commit_id":"4e033a1522391725fcfa5e737141260e8768eb38","original_commit_id":"4e033a1522391725fcfa5e737141260e8768eb38","user":{"login":"cevich","id":1183438,"avatar_url":"https://avatars.githubusercontent.com/u/1183438?","gravatar_id":"bf3380f4ce6270b075a9564bcd93006f","url":"https://api.github.com/users/cevich","html_url":"https://github.com/cevich","followers_url":"https://api.github.com/users/cevich/followers","following_url":"https://api.github.com/users/cevich/following{/other_user}","gists_url":"https://api.github.com/users/cevich/gists{/gist_id}","starred_url":"https://api.github.com/users/cevich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cevich/subscriptions","organizations_url":"https://api.github.com/users/cevich/orgs","repos_url":"https://api.github.com/users/cevich/repos","events_url":"https://api.github.com/users/cevich/events{/privacy}","received_events_url":"https://api.github.com/users/cevich/received_events","type":"User","site_admin":false},"body":"This is a bit dense, could be helpful in debugging if it was unrolled a bit.  How about:\r\n\r\n     xsplit = [x.split() for x in output.split('\\n') if x]\r\n     ysplit = [(y[1], y[0]) for y in xsplit]\r\n     return dict(ysplit)","created_at":"2014-04-22T18:47:01Z","updated_at":"2014-04-22T18:47:01Z","html_url":"https://github.com/autotest/autotest-docker/pull/95#discussion_r11869291","pull_request_url":"https://api.github.com/repos/autotest/autotest-docker/pulls/95","_links":{"self":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/comments/11869291"},"html":{"href":"https://github.com/autotest/autotest-docker/pull/95#discussion_r11869291"},"pull_request":{"href":"https://api.github.com/repos/autotest/autotest-docker/pulls/95"}}}}