{"action":"created","comment":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/76446360","id":76446360,"diff_hunk":"@@ -1,11 +1,72 @@\n-from cassandra import AlreadyExists, Unavailable, InvalidRequest, Unauthorized\n+from unittest import TestCase\n+\n+from cassandra import AlreadyExists, InvalidRequest, Unauthorized, Unavailable\n from mock import Mock\n-from assertions import (assert_one, assert_none, assert_exception, assert_unavailable,\n-                        assert_invalid, assert_unauthorized, assert_all, assert_almost_equal,\n-                        assert_length_equal, assert_row_count)\n+\n+from assertions import (assert_all, assert_almost_equal, assert_exception,\n+                        assert_invalid, assert_length_equal, assert_none,\n+                        assert_one, assert_row_count, assert_stderr_clean,\n+                        assert_unauthorized, assert_unavailable)\n+\n+\n+class TestAssertStderrClean(TestCase):\n+\n+    def test_empty_string(self):\n+        err = ''\n+        assert_stderr_clean(err)\n+\n+    def test_good_string_one(self):\n+        err = \"\"\"objc[65696]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.\n+                 WARN  15:28:24,788 JNA link failure, one or more native method will be unavailable.\"\"\"\n+        assert_stderr_clean(err)\n+\n+    def test_good_string_two(self):\n+        err = (\"objc[36358]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk\"\n+               \"/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib.\"\n+               \"One of the two will be used. Which one is undefined.\")\n+        assert_stderr_clean(err)\n+\n+    def test_good_string_with_empty_space(self):\n+        err = \"\"\"WARN  14:08:15,018 JNA link failure, one or more native method will be unavailable.objc[36358]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.\n+                 \"\"\"\n+        assert_stderr_clean(err)\n+\n+    def test_good_string_three(self):\n+        err = (\"objc[36358]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk\"\n+               \"/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib.\"\n+               \"One of the two will be used. Which one is undefined.\")\n+        assert_stderr_clean(err)\n+\n+    def test_bad_string1(self):\n+        err = \"This string is no good and should fail.\"\n+        with self.assertRaises(AssertionError):\n+            assert_stderr_clean(err)\n+\n+    def test_bad_string2(self):\n+        err = (\"This string is no good and should fail.objc[36358]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk\"\n+               \"/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib.\"\n+               \"One of the two will be used. Which one is undefined.\")\n+        with self.assertRaises(AssertionError):\n+            assert_stderr_clean(err)\n+\n+    def test_bad_string3(self):\n+        err = \"\"\"objc[36358]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk\n+               /Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home/jre/lib/libinstrument.dylib.\n+               One of the two will be used. Which one is undefined.\n+               This string is no good and should fail.\"\"\"\n+        with self.assertRaises(AssertionError):\n+            assert_stderr_clean(err)\n+\n+    def test_bad_string4(self):","path":"meta_tests/assertion_test.py","position":64,"original_position":64,"commit_id":"faecd52391cf5d13ca0a10d7b64bc71bbb388b59","original_commit_id":"faecd52391cf5d13ca0a10d7b64bc71bbb388b59","user":{"login":"ptnapoleon","id":3408144,"avatar_url":"https://avatars.githubusercontent.com/u/3408144?v=3","gravatar_id":"","url":"https://api.github.com/users/ptnapoleon","html_url":"https://github.com/ptnapoleon","followers_url":"https://api.github.com/users/ptnapoleon/followers","following_url":"https://api.github.com/users/ptnapoleon/following{/other_user}","gists_url":"https://api.github.com/users/ptnapoleon/gists{/gist_id}","starred_url":"https://api.github.com/users/ptnapoleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptnapoleon/subscriptions","organizations_url":"https://api.github.com/users/ptnapoleon/orgs","repos_url":"https://api.github.com/users/ptnapoleon/repos","events_url":"https://api.github.com/users/ptnapoleon/events{/privacy}","received_events_url":"https://api.github.com/users/ptnapoleon/received_events","type":"User","site_admin":false},"body":"`test_invalid_error_before_valid_errors`","created_at":"2016-08-26T16:20:32Z","updated_at":"2016-08-26T16:20:32Z","html_url":"https://github.com/riptano/cassandra-dtest/pull/1248#discussion_r76446360","pull_request_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248","_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments/76446360"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1248#discussion_r76446360"},"pull_request":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248"}}},"pull_request":{"url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248","id":81544455,"html_url":"https://github.com/riptano/cassandra-dtest/pull/1248","diff_url":"https://github.com/riptano/cassandra-dtest/pull/1248.diff","patch_url":"https://github.com/riptano/cassandra-dtest/pull/1248.patch","issue_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1248","number":1248,"state":"open","locked":false,"title":"allow scrub_test.py to pass on OSX using assert_stderr_clean","user":{"login":"c-kodman","id":16600345,"avatar_url":"https://avatars.githubusercontent.com/u/16600345?v=3","gravatar_id":"","url":"https://api.github.com/users/c-kodman","html_url":"https://github.com/c-kodman","followers_url":"https://api.github.com/users/c-kodman/followers","following_url":"https://api.github.com/users/c-kodman/following{/other_user}","gists_url":"https://api.github.com/users/c-kodman/gists{/gist_id}","starred_url":"https://api.github.com/users/c-kodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-kodman/subscriptions","organizations_url":"https://api.github.com/users/c-kodman/orgs","repos_url":"https://api.github.com/users/c-kodman/repos","events_url":"https://api.github.com/users/c-kodman/events{/privacy}","received_events_url":"https://api.github.com/users/c-kodman/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-16T21:04:12Z","updated_at":"2016-08-26T16:20:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"852c964305cbb75fef77101ffe3a96c983cc6123","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248/commits","review_comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248/comments","review_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1248/comments","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/faecd52391cf5d13ca0a10d7b64bc71bbb388b59","head":{"label":"c-kodman:cstar640","ref":"cstar640","sha":"faecd52391cf5d13ca0a10d7b64bc71bbb388b59","user":{"login":"c-kodman","id":16600345,"avatar_url":"https://avatars.githubusercontent.com/u/16600345?v=3","gravatar_id":"","url":"https://api.github.com/users/c-kodman","html_url":"https://github.com/c-kodman","followers_url":"https://api.github.com/users/c-kodman/followers","following_url":"https://api.github.com/users/c-kodman/following{/other_user}","gists_url":"https://api.github.com/users/c-kodman/gists{/gist_id}","starred_url":"https://api.github.com/users/c-kodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-kodman/subscriptions","organizations_url":"https://api.github.com/users/c-kodman/orgs","repos_url":"https://api.github.com/users/c-kodman/repos","events_url":"https://api.github.com/users/c-kodman/events{/privacy}","received_events_url":"https://api.github.com/users/c-kodman/received_events","type":"User","site_admin":false},"repo":{"id":55260551,"name":"cassandra-dtest","full_name":"c-kodman/cassandra-dtest","owner":{"login":"c-kodman","id":16600345,"avatar_url":"https://avatars.githubusercontent.com/u/16600345?v=3","gravatar_id":"","url":"https://api.github.com/users/c-kodman","html_url":"https://github.com/c-kodman","followers_url":"https://api.github.com/users/c-kodman/followers","following_url":"https://api.github.com/users/c-kodman/following{/other_user}","gists_url":"https://api.github.com/users/c-kodman/gists{/gist_id}","starred_url":"https://api.github.com/users/c-kodman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c-kodman/subscriptions","organizations_url":"https://api.github.com/users/c-kodman/orgs","repos_url":"https://api.github.com/users/c-kodman/repos","events_url":"https://api.github.com/users/c-kodman/events{/privacy}","received_events_url":"https://api.github.com/users/c-kodman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/c-kodman/cassandra-dtest","description":"Cassandra Distributed Tests","fork":true,"url":"https://api.github.com/repos/c-kodman/cassandra-dtest","forks_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/releases{/id}","deployments_url":"https://api.github.com/repos/c-kodman/cassandra-dtest/deployments","created_at":"2016-04-01T20:32:12Z","updated_at":"2016-04-01T20:32:14Z","pushed_at":"2016-08-26T16:13:56Z","git_url":"git://github.com/c-kodman/cassandra-dtest.git","ssh_url":"git@github.com:c-kodman/cassandra-dtest.git","clone_url":"https://github.com/c-kodman/cassandra-dtest.git","svn_url":"https://github.com/c-kodman/cassandra-dtest","homepage":"","size":16996,"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":"riptano:master","ref":"master","sha":"f4d57cbc5cf27759d8ad4c529aa49a0fc6ec08fd","user":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"repo":{"id":2674774,"name":"cassandra-dtest","full_name":"riptano/cassandra-dtest","owner":{"login":"riptano","id":275430,"avatar_url":"https://avatars.githubusercontent.com/u/275430?v=3","gravatar_id":"","url":"https://api.github.com/users/riptano","html_url":"https://github.com/riptano","followers_url":"https://api.github.com/users/riptano/followers","following_url":"https://api.github.com/users/riptano/following{/other_user}","gists_url":"https://api.github.com/users/riptano/gists{/gist_id}","starred_url":"https://api.github.com/users/riptano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/riptano/subscriptions","organizations_url":"https://api.github.com/users/riptano/orgs","repos_url":"https://api.github.com/users/riptano/repos","events_url":"https://api.github.com/users/riptano/events{/privacy}","received_events_url":"https://api.github.com/users/riptano/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/riptano/cassandra-dtest","description":"Cassandra Distributed Tests","fork":false,"url":"https://api.github.com/repos/riptano/cassandra-dtest","forks_url":"https://api.github.com/repos/riptano/cassandra-dtest/forks","keys_url":"https://api.github.com/repos/riptano/cassandra-dtest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/riptano/cassandra-dtest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/riptano/cassandra-dtest/teams","hooks_url":"https://api.github.com/repos/riptano/cassandra-dtest/hooks","issue_events_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/events{/number}","events_url":"https://api.github.com/repos/riptano/cassandra-dtest/events","assignees_url":"https://api.github.com/repos/riptano/cassandra-dtest/assignees{/user}","branches_url":"https://api.github.com/repos/riptano/cassandra-dtest/branches{/branch}","tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/tags","blobs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/refs{/sha}","trees_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/{sha}","languages_url":"https://api.github.com/repos/riptano/cassandra-dtest/languages","stargazers_url":"https://api.github.com/repos/riptano/cassandra-dtest/stargazers","contributors_url":"https://api.github.com/repos/riptano/cassandra-dtest/contributors","subscribers_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscribers","subscription_url":"https://api.github.com/repos/riptano/cassandra-dtest/subscription","commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/commits{/sha}","git_commits_url":"https://api.github.com/repos/riptano/cassandra-dtest/git/commits{/sha}","comments_url":"https://api.github.com/repos/riptano/cassandra-dtest/comments{/number}","issue_comment_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues/comments{/number}","contents_url":"https://api.github.com/repos/riptano/cassandra-dtest/contents/{+path}","compare_url":"https://api.github.com/repos/riptano/cassandra-dtest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/riptano/cassandra-dtest/merges","archive_url":"https://api.github.com/repos/riptano/cassandra-dtest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/riptano/cassandra-dtest/downloads","issues_url":"https://api.github.com/repos/riptano/cassandra-dtest/issues{/number}","pulls_url":"https://api.github.com/repos/riptano/cassandra-dtest/pulls{/number}","milestones_url":"https://api.github.com/repos/riptano/cassandra-dtest/milestones{/number}","notifications_url":"https://api.github.com/repos/riptano/cassandra-dtest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/riptano/cassandra-dtest/labels{/name}","releases_url":"https://api.github.com/repos/riptano/cassandra-dtest/releases{/id}","deployments_url":"https://api.github.com/repos/riptano/cassandra-dtest/deployments","created_at":"2011-10-30T11:15:44Z","updated_at":"2016-08-22T00:49:30Z","pushed_at":"2016-08-26T16:13:57Z","git_url":"git://github.com/riptano/cassandra-dtest.git","ssh_url":"git@github.com:riptano/cassandra-dtest.git","clone_url":"https://github.com/riptano/cassandra-dtest.git","svn_url":"https://github.com/riptano/cassandra-dtest","homepage":"","size":17857,"stargazers_count":78,"watchers_count":78,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"open_issues_count":57,"forks":69,"open_issues":57,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248"},"html":{"href":"https://github.com/riptano/cassandra-dtest/pull/1248"},"issue":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1248"},"comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/issues/1248/comments"},"review_comments":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248/comments"},"review_comment":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/pulls/1248/commits"},"statuses":{"href":"https://api.github.com/repos/riptano/cassandra-dtest/statuses/faecd52391cf5d13ca0a10d7b64bc71bbb388b59"}}}}
{"actor":{"display_login":"ptnapoleon"}}