{"action":"created","comment":{"url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/comments/86828761","pull_request_review_id":7467208,"id":86828761,"diff_hunk":"@@ -7,11 +7,28 @@\n # ###\n \"\"\"CLI tests.\"\"\"\n import os\n+import sys\n+import tempfile\n import unittest\n-try:\n-    from unittest import mock\n-except ImportError:\n-    import mock\n+\n+from contextlib import contextmanager\n+from io import StringIO\n+\n+\n+# noqa from http://stackoverflow.com/questions/4219717/how-to-assert-output-with-nosetest-unittest-in-python\n+@contextmanager\n+def captured_output():\n+    if sys.version_info[0] == 3:\n+        new_out, new_err = StringIO(), StringIO()\n+    else:\n+        from io import BytesIO\n+        new_out, new_err = BytesIO(), BytesIO()\n+    old_out, old_err = sys.stdout, sys.stderr\n+    try:\n+        sys.stdout, sys.stderr = new_out, new_err\n+        yield sys.stdout, sys.stderr\n+    finally:\n+        sys.stdout, sys.stderr = old_out, old_err","path":"cnxeasybake/tests/test_cli.py","position":null,"original_position":29,"commit_id":"b89eaea5be8559d8179b466b05cc2885fa4b355f","original_commit_id":"c93aceb779b1e1b4f508c9fea8483b477601c58a","user":{"login":"reedstrm","id":253212,"avatar_url":"https://avatars.githubusercontent.com/u/253212?v=3","gravatar_id":"","url":"https://api.github.com/users/reedstrm","html_url":"https://github.com/reedstrm","followers_url":"https://api.github.com/users/reedstrm/followers","following_url":"https://api.github.com/users/reedstrm/following{/other_user}","gists_url":"https://api.github.com/users/reedstrm/gists{/gist_id}","starred_url":"https://api.github.com/users/reedstrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reedstrm/subscriptions","organizations_url":"https://api.github.com/users/reedstrm/orgs","repos_url":"https://api.github.com/users/reedstrm/repos","events_url":"https://api.github.com/users/reedstrm/events{/privacy}","received_events_url":"https://api.github.com/users/reedstrm/received_events","type":"User","site_admin":false},"body":"solved this - don't send unicode to logging, in python 2.7","created_at":"2016-11-07T17:48:14Z","updated_at":"2016-11-07T17:48:14Z","html_url":"https://github.com/Connexions/cnx-easybake/pull/45#discussion_r86828761","pull_request_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/comments/86828761"},"html":{"href":"https://github.com/Connexions/cnx-easybake/pull/45#discussion_r86828761"},"pull_request":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45","id":92225256,"html_url":"https://github.com/Connexions/cnx-easybake/pull/45","diff_url":"https://github.com/Connexions/cnx-easybake/pull/45.diff","patch_url":"https://github.com/Connexions/cnx-easybake/pull/45.patch","issue_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/45","number":45,"state":"open","locked":false,"title":"support CSS coverage output file","user":{"login":"philschatz","id":253202,"avatar_url":"https://avatars.githubusercontent.com/u/253202?v=3","gravatar_id":"","url":"https://api.github.com/users/philschatz","html_url":"https://github.com/philschatz","followers_url":"https://api.github.com/users/philschatz/followers","following_url":"https://api.github.com/users/philschatz/following{/other_user}","gists_url":"https://api.github.com/users/philschatz/gists{/gist_id}","starred_url":"https://api.github.com/users/philschatz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philschatz/subscriptions","organizations_url":"https://api.github.com/users/philschatz/orgs","repos_url":"https://api.github.com/users/philschatz/repos","events_url":"https://api.github.com/users/philschatz/events{/privacy}","received_events_url":"https://api.github.com/users/philschatz/received_events","type":"User","site_admin":false},"body":"Optionally generates a CSS coverage file which shows which selectors were matched when baking.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/253202/19982116/2601a30c-a1db-11e6-86e4-36677c235270.png)\r\n\r\nIt currently only shows the selectors that were matched, not the declarations but it is still vastly more precise than what `cnx-recipes` was doing before because this marks the selectors as they are being used.\r\n\r\nI was not sure about the best way to store the coverage lines (I just built an array of strings of the format `DA:#,#` and then joined them outside of the main lib) but let me know and I'll fix it!\r\n\r\n# Notes\r\n\r\n- this does not add the (optional) `LH: #` and `LF: #` fields defined in the lcov format (they're a little harder to calculate)\r\n- this does not try to minimize the `.lcov` file size","created_at":"2016-11-03T19:37:30Z","updated_at":"2016-11-07T17:48:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2973cda2680e9896c9dfea1f3ab098d46716bc27","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45/commits","review_comments_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45/comments","review_comment_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/45/comments","statuses_url":"https://api.github.com/repos/Connexions/cnx-easybake/statuses/b89eaea5be8559d8179b466b05cc2885fa4b355f","head":{"label":"Connexions:css-coverage","ref":"css-coverage","sha":"b89eaea5be8559d8179b466b05cc2885fa4b355f","user":{"login":"Connexions","id":772455,"avatar_url":"https://avatars.githubusercontent.com/u/772455?v=3","gravatar_id":"","url":"https://api.github.com/users/Connexions","html_url":"https://github.com/Connexions","followers_url":"https://api.github.com/users/Connexions/followers","following_url":"https://api.github.com/users/Connexions/following{/other_user}","gists_url":"https://api.github.com/users/Connexions/gists{/gist_id}","starred_url":"https://api.github.com/users/Connexions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connexions/subscriptions","organizations_url":"https://api.github.com/users/Connexions/orgs","repos_url":"https://api.github.com/users/Connexions/repos","events_url":"https://api.github.com/users/Connexions/events{/privacy}","received_events_url":"https://api.github.com/users/Connexions/received_events","type":"Organization","site_admin":false},"repo":{"id":52555418,"name":"cnx-easybake","full_name":"Connexions/cnx-easybake","owner":{"login":"Connexions","id":772455,"avatar_url":"https://avatars.githubusercontent.com/u/772455?v=3","gravatar_id":"","url":"https://api.github.com/users/Connexions","html_url":"https://github.com/Connexions","followers_url":"https://api.github.com/users/Connexions/followers","following_url":"https://api.github.com/users/Connexions/following{/other_user}","gists_url":"https://api.github.com/users/Connexions/gists{/gist_id}","starred_url":"https://api.github.com/users/Connexions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connexions/subscriptions","organizations_url":"https://api.github.com/users/Connexions/orgs","repos_url":"https://api.github.com/users/Connexions/repos","events_url":"https://api.github.com/users/Connexions/events{/privacy}","received_events_url":"https://api.github.com/users/Connexions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Connexions/cnx-easybake","description":null,"fork":false,"url":"https://api.github.com/repos/Connexions/cnx-easybake","forks_url":"https://api.github.com/repos/Connexions/cnx-easybake/forks","keys_url":"https://api.github.com/repos/Connexions/cnx-easybake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Connexions/cnx-easybake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Connexions/cnx-easybake/teams","hooks_url":"https://api.github.com/repos/Connexions/cnx-easybake/hooks","issue_events_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/events{/number}","events_url":"https://api.github.com/repos/Connexions/cnx-easybake/events","assignees_url":"https://api.github.com/repos/Connexions/cnx-easybake/assignees{/user}","branches_url":"https://api.github.com/repos/Connexions/cnx-easybake/branches{/branch}","tags_url":"https://api.github.com/repos/Connexions/cnx-easybake/tags","blobs_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/refs{/sha}","trees_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Connexions/cnx-easybake/statuses/{sha}","languages_url":"https://api.github.com/repos/Connexions/cnx-easybake/languages","stargazers_url":"https://api.github.com/repos/Connexions/cnx-easybake/stargazers","contributors_url":"https://api.github.com/repos/Connexions/cnx-easybake/contributors","subscribers_url":"https://api.github.com/repos/Connexions/cnx-easybake/subscribers","subscription_url":"https://api.github.com/repos/Connexions/cnx-easybake/subscription","commits_url":"https://api.github.com/repos/Connexions/cnx-easybake/commits{/sha}","git_commits_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/commits{/sha}","comments_url":"https://api.github.com/repos/Connexions/cnx-easybake/comments{/number}","issue_comment_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/comments{/number}","contents_url":"https://api.github.com/repos/Connexions/cnx-easybake/contents/{+path}","compare_url":"https://api.github.com/repos/Connexions/cnx-easybake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Connexions/cnx-easybake/merges","archive_url":"https://api.github.com/repos/Connexions/cnx-easybake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Connexions/cnx-easybake/downloads","issues_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues{/number}","pulls_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls{/number}","milestones_url":"https://api.github.com/repos/Connexions/cnx-easybake/milestones{/number}","notifications_url":"https://api.github.com/repos/Connexions/cnx-easybake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Connexions/cnx-easybake/labels{/name}","releases_url":"https://api.github.com/repos/Connexions/cnx-easybake/releases{/id}","deployments_url":"https://api.github.com/repos/Connexions/cnx-easybake/deployments","created_at":"2016-02-25T20:42:15Z","updated_at":"2016-10-25T18:42:34Z","pushed_at":"2016-11-07T17:47:17Z","git_url":"git://github.com/Connexions/cnx-easybake.git","ssh_url":"git@github.com:Connexions/cnx-easybake.git","clone_url":"https://github.com/Connexions/cnx-easybake.git","svn_url":"https://github.com/Connexions/cnx-easybake","homepage":null,"size":388,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"base":{"label":"Connexions:master","ref":"master","sha":"ae753b592b91bafb860ae7dcbf62eb10c033c89e","user":{"login":"Connexions","id":772455,"avatar_url":"https://avatars.githubusercontent.com/u/772455?v=3","gravatar_id":"","url":"https://api.github.com/users/Connexions","html_url":"https://github.com/Connexions","followers_url":"https://api.github.com/users/Connexions/followers","following_url":"https://api.github.com/users/Connexions/following{/other_user}","gists_url":"https://api.github.com/users/Connexions/gists{/gist_id}","starred_url":"https://api.github.com/users/Connexions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connexions/subscriptions","organizations_url":"https://api.github.com/users/Connexions/orgs","repos_url":"https://api.github.com/users/Connexions/repos","events_url":"https://api.github.com/users/Connexions/events{/privacy}","received_events_url":"https://api.github.com/users/Connexions/received_events","type":"Organization","site_admin":false},"repo":{"id":52555418,"name":"cnx-easybake","full_name":"Connexions/cnx-easybake","owner":{"login":"Connexions","id":772455,"avatar_url":"https://avatars.githubusercontent.com/u/772455?v=3","gravatar_id":"","url":"https://api.github.com/users/Connexions","html_url":"https://github.com/Connexions","followers_url":"https://api.github.com/users/Connexions/followers","following_url":"https://api.github.com/users/Connexions/following{/other_user}","gists_url":"https://api.github.com/users/Connexions/gists{/gist_id}","starred_url":"https://api.github.com/users/Connexions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Connexions/subscriptions","organizations_url":"https://api.github.com/users/Connexions/orgs","repos_url":"https://api.github.com/users/Connexions/repos","events_url":"https://api.github.com/users/Connexions/events{/privacy}","received_events_url":"https://api.github.com/users/Connexions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Connexions/cnx-easybake","description":null,"fork":false,"url":"https://api.github.com/repos/Connexions/cnx-easybake","forks_url":"https://api.github.com/repos/Connexions/cnx-easybake/forks","keys_url":"https://api.github.com/repos/Connexions/cnx-easybake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Connexions/cnx-easybake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Connexions/cnx-easybake/teams","hooks_url":"https://api.github.com/repos/Connexions/cnx-easybake/hooks","issue_events_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/events{/number}","events_url":"https://api.github.com/repos/Connexions/cnx-easybake/events","assignees_url":"https://api.github.com/repos/Connexions/cnx-easybake/assignees{/user}","branches_url":"https://api.github.com/repos/Connexions/cnx-easybake/branches{/branch}","tags_url":"https://api.github.com/repos/Connexions/cnx-easybake/tags","blobs_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/refs{/sha}","trees_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Connexions/cnx-easybake/statuses/{sha}","languages_url":"https://api.github.com/repos/Connexions/cnx-easybake/languages","stargazers_url":"https://api.github.com/repos/Connexions/cnx-easybake/stargazers","contributors_url":"https://api.github.com/repos/Connexions/cnx-easybake/contributors","subscribers_url":"https://api.github.com/repos/Connexions/cnx-easybake/subscribers","subscription_url":"https://api.github.com/repos/Connexions/cnx-easybake/subscription","commits_url":"https://api.github.com/repos/Connexions/cnx-easybake/commits{/sha}","git_commits_url":"https://api.github.com/repos/Connexions/cnx-easybake/git/commits{/sha}","comments_url":"https://api.github.com/repos/Connexions/cnx-easybake/comments{/number}","issue_comment_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues/comments{/number}","contents_url":"https://api.github.com/repos/Connexions/cnx-easybake/contents/{+path}","compare_url":"https://api.github.com/repos/Connexions/cnx-easybake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Connexions/cnx-easybake/merges","archive_url":"https://api.github.com/repos/Connexions/cnx-easybake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Connexions/cnx-easybake/downloads","issues_url":"https://api.github.com/repos/Connexions/cnx-easybake/issues{/number}","pulls_url":"https://api.github.com/repos/Connexions/cnx-easybake/pulls{/number}","milestones_url":"https://api.github.com/repos/Connexions/cnx-easybake/milestones{/number}","notifications_url":"https://api.github.com/repos/Connexions/cnx-easybake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Connexions/cnx-easybake/labels{/name}","releases_url":"https://api.github.com/repos/Connexions/cnx-easybake/releases{/id}","deployments_url":"https://api.github.com/repos/Connexions/cnx-easybake/deployments","created_at":"2016-02-25T20:42:15Z","updated_at":"2016-10-25T18:42:34Z","pushed_at":"2016-11-07T17:47:17Z","git_url":"git://github.com/Connexions/cnx-easybake.git","ssh_url":"git@github.com:Connexions/cnx-easybake.git","clone_url":"https://github.com/Connexions/cnx-easybake.git","svn_url":"https://github.com/Connexions/cnx-easybake","homepage":null,"size":388,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45"},"html":{"href":"https://github.com/Connexions/cnx-easybake/pull/45"},"issue":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/issues/45"},"comments":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/Connexions/cnx-easybake/statuses/b89eaea5be8559d8179b466b05cc2885fa4b355f"}}}}
{"actor":{"display_login":"reedstrm"}}