{"action":"created","comment":{"url":"https://api.github.com/repos/joblib/joblib/pulls/comments/92159031","pull_request_review_id":12667756,"id":92159031,"diff_hunk":"@@ -164,35 +165,28 @@ def test_hash_numpy_noncontiguous():\n \n \n @with_numpy\n-def test_hash_memmap():\n-    \"\"\" Check that memmap and arrays hash identically if coerce_mmap is\n-        True.\n-    \"\"\"\n-    filename = tempfile.mktemp(prefix='joblib_test_hash_memmap_')\n+@parametrize('coerce_mmap', [True, False])\n+def test_hash_memmap(tmpdir, coerce_mmap):\n+    \"\"\"Check that memmap and arrays hash identically if coerce_mmap is True.\"\"\"\n+    filename = tmpdir.join('memmap_temp').strpath\n     try:\n         m = np.memmap(filename, shape=(10, 10), mode='w+')\n         a = np.asarray(m)\n-        for coerce_mmap in (False, True):\n-            yield (assert_equal,\n-                   hash(a, coerce_mmap=coerce_mmap) ==\n-                   hash(m, coerce_mmap=coerce_mmap),\n-                   coerce_mmap)\n+        are_hashes_equal = (hash(a, coerce_mmap=coerce_mmap) ==\n+                            hash(m, coerce_mmap=coerce_mmap))\n+        assert are_hashes_equal == coerce_mmap\n     finally:\n         if 'm' in locals():\n             del m\n             # Force a garbage-collection cycle, to be certain that the\n             # object is delete, and we don't run in a problem under\n             # Windows with a file handle still open.\n             gc.collect()\n-            try:\n-                os.unlink(filename)\n-            except OSError as e:\n-                # Under windows, some files don't get erased.\n-                if not os.name == 'nt':\n-                    raise e\n \n \n @with_numpy\n+@skipif(sys.platform == 'win32', reason='This test is not stable under windows'","path":"joblib/test/test_hashing.py","position":194,"original_position":194,"commit_id":"4609bd3c04cff67db2abe08de28af22a7df16362","original_commit_id":"4609bd3c04cff67db2abe08de28af22a7df16362","user":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"body":"Okay, cool :smile: ","created_at":"2016-12-13T12:31:59Z","updated_at":"2016-12-13T12:32:00Z","html_url":"https://github.com/joblib/joblib/pull/454#discussion_r92159031","pull_request_url":"https://api.github.com/repos/joblib/joblib/pulls/454","_links":{"self":{"href":"https://api.github.com/repos/joblib/joblib/pulls/comments/92159031"},"html":{"href":"https://github.com/joblib/joblib/pull/454#discussion_r92159031"},"pull_request":{"href":"https://api.github.com/repos/joblib/joblib/pulls/454"}}},"pull_request":{"url":"https://api.github.com/repos/joblib/joblib/pulls/454","id":97570069,"html_url":"https://github.com/joblib/joblib/pull/454","diff_url":"https://github.com/joblib/joblib/pull/454.diff","patch_url":"https://github.com/joblib/joblib/pull/454.patch","issue_url":"https://api.github.com/repos/joblib/joblib/issues/454","number":454,"state":"open","locked":false,"title":"[MRG] Refactor test_hashing.py as per pytest design.","user":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"body":"#### Third Phase PR on #411 (Succeeding PR #453)\r\n\r\nThis PR deals with refactor of tests in **test_hashing.py** to adopt the pytest flavor.\r\n\r\n* Parametrization of certain tests have been done by an accompanying fixture to protect numpy specific code using `@with_numpy`. Refer https://github.com/joblib/joblib/issues/411#issuecomment-266444495 for more details.\r\n\r\n* Regex checking of tests has been done using pytest now.\r\n\r\n* `tmpdir_path` fixture has been removed and pytest's own `tmpdir` is brought back to used to keep uniformity across modules. Some older occurences (if any) will be taken care later.\r\n\r\n* Some cosmetic changes like reordering of imports has been included.","created_at":"2016-12-12T15:11:18Z","updated_at":"2016-12-13T12:32:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c9ef0bd719a6db8dedae006715bcb70145ecfdc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/joblib/joblib/pulls/454/commits","review_comments_url":"https://api.github.com/repos/joblib/joblib/pulls/454/comments","review_comment_url":"https://api.github.com/repos/joblib/joblib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joblib/joblib/issues/454/comments","statuses_url":"https://api.github.com/repos/joblib/joblib/statuses/4609bd3c04cff67db2abe08de28af22a7df16362","head":{"label":"karandesai-96:pytestify-test-hashing","ref":"pytestify-test-hashing","sha":"4609bd3c04cff67db2abe08de28af22a7df16362","user":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"repo":{"id":72710695,"name":"joblib","full_name":"karandesai-96/joblib","owner":{"login":"karandesai-96","id":10494087,"avatar_url":"https://avatars.githubusercontent.com/u/10494087?v=3","gravatar_id":"","url":"https://api.github.com/users/karandesai-96","html_url":"https://github.com/karandesai-96","followers_url":"https://api.github.com/users/karandesai-96/followers","following_url":"https://api.github.com/users/karandesai-96/following{/other_user}","gists_url":"https://api.github.com/users/karandesai-96/gists{/gist_id}","starred_url":"https://api.github.com/users/karandesai-96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karandesai-96/subscriptions","organizations_url":"https://api.github.com/users/karandesai-96/orgs","repos_url":"https://api.github.com/users/karandesai-96/repos","events_url":"https://api.github.com/users/karandesai-96/events{/privacy}","received_events_url":"https://api.github.com/users/karandesai-96/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karandesai-96/joblib","description":"Python function as pipeline jobs.","fork":true,"url":"https://api.github.com/repos/karandesai-96/joblib","forks_url":"https://api.github.com/repos/karandesai-96/joblib/forks","keys_url":"https://api.github.com/repos/karandesai-96/joblib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karandesai-96/joblib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karandesai-96/joblib/teams","hooks_url":"https://api.github.com/repos/karandesai-96/joblib/hooks","issue_events_url":"https://api.github.com/repos/karandesai-96/joblib/issues/events{/number}","events_url":"https://api.github.com/repos/karandesai-96/joblib/events","assignees_url":"https://api.github.com/repos/karandesai-96/joblib/assignees{/user}","branches_url":"https://api.github.com/repos/karandesai-96/joblib/branches{/branch}","tags_url":"https://api.github.com/repos/karandesai-96/joblib/tags","blobs_url":"https://api.github.com/repos/karandesai-96/joblib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karandesai-96/joblib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karandesai-96/joblib/git/refs{/sha}","trees_url":"https://api.github.com/repos/karandesai-96/joblib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karandesai-96/joblib/statuses/{sha}","languages_url":"https://api.github.com/repos/karandesai-96/joblib/languages","stargazers_url":"https://api.github.com/repos/karandesai-96/joblib/stargazers","contributors_url":"https://api.github.com/repos/karandesai-96/joblib/contributors","subscribers_url":"https://api.github.com/repos/karandesai-96/joblib/subscribers","subscription_url":"https://api.github.com/repos/karandesai-96/joblib/subscription","commits_url":"https://api.github.com/repos/karandesai-96/joblib/commits{/sha}","git_commits_url":"https://api.github.com/repos/karandesai-96/joblib/git/commits{/sha}","comments_url":"https://api.github.com/repos/karandesai-96/joblib/comments{/number}","issue_comment_url":"https://api.github.com/repos/karandesai-96/joblib/issues/comments{/number}","contents_url":"https://api.github.com/repos/karandesai-96/joblib/contents/{+path}","compare_url":"https://api.github.com/repos/karandesai-96/joblib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karandesai-96/joblib/merges","archive_url":"https://api.github.com/repos/karandesai-96/joblib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karandesai-96/joblib/downloads","issues_url":"https://api.github.com/repos/karandesai-96/joblib/issues{/number}","pulls_url":"https://api.github.com/repos/karandesai-96/joblib/pulls{/number}","milestones_url":"https://api.github.com/repos/karandesai-96/joblib/milestones{/number}","notifications_url":"https://api.github.com/repos/karandesai-96/joblib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karandesai-96/joblib/labels{/name}","releases_url":"https://api.github.com/repos/karandesai-96/joblib/releases{/id}","deployments_url":"https://api.github.com/repos/karandesai-96/joblib/deployments","created_at":"2016-11-03T05:08:11Z","updated_at":"2016-11-03T05:08:15Z","pushed_at":"2016-12-13T10:53:10Z","git_url":"git://github.com/karandesai-96/joblib.git","ssh_url":"git@github.com:karandesai-96/joblib.git","clone_url":"https://github.com/karandesai-96/joblib.git","svn_url":"https://github.com/karandesai-96/joblib","homepage":"http://packages.python.org/joblib/","size":2609,"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":"joblib:master","ref":"master","sha":"1e4232b70db56964352c7eb452882f4b3063be67","user":{"login":"joblib","id":332661,"avatar_url":"https://avatars.githubusercontent.com/u/332661?v=3","gravatar_id":"","url":"https://api.github.com/users/joblib","html_url":"https://github.com/joblib","followers_url":"https://api.github.com/users/joblib/followers","following_url":"https://api.github.com/users/joblib/following{/other_user}","gists_url":"https://api.github.com/users/joblib/gists{/gist_id}","starred_url":"https://api.github.com/users/joblib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joblib/subscriptions","organizations_url":"https://api.github.com/users/joblib/orgs","repos_url":"https://api.github.com/users/joblib/repos","events_url":"https://api.github.com/users/joblib/events{/privacy}","received_events_url":"https://api.github.com/users/joblib/received_events","type":"Organization","site_admin":false},"repo":{"id":654608,"name":"joblib","full_name":"joblib/joblib","owner":{"login":"joblib","id":332661,"avatar_url":"https://avatars.githubusercontent.com/u/332661?v=3","gravatar_id":"","url":"https://api.github.com/users/joblib","html_url":"https://github.com/joblib","followers_url":"https://api.github.com/users/joblib/followers","following_url":"https://api.github.com/users/joblib/following{/other_user}","gists_url":"https://api.github.com/users/joblib/gists{/gist_id}","starred_url":"https://api.github.com/users/joblib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joblib/subscriptions","organizations_url":"https://api.github.com/users/joblib/orgs","repos_url":"https://api.github.com/users/joblib/repos","events_url":"https://api.github.com/users/joblib/events{/privacy}","received_events_url":"https://api.github.com/users/joblib/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joblib/joblib","description":"Python function as pipeline jobs.","fork":false,"url":"https://api.github.com/repos/joblib/joblib","forks_url":"https://api.github.com/repos/joblib/joblib/forks","keys_url":"https://api.github.com/repos/joblib/joblib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joblib/joblib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joblib/joblib/teams","hooks_url":"https://api.github.com/repos/joblib/joblib/hooks","issue_events_url":"https://api.github.com/repos/joblib/joblib/issues/events{/number}","events_url":"https://api.github.com/repos/joblib/joblib/events","assignees_url":"https://api.github.com/repos/joblib/joblib/assignees{/user}","branches_url":"https://api.github.com/repos/joblib/joblib/branches{/branch}","tags_url":"https://api.github.com/repos/joblib/joblib/tags","blobs_url":"https://api.github.com/repos/joblib/joblib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joblib/joblib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joblib/joblib/git/refs{/sha}","trees_url":"https://api.github.com/repos/joblib/joblib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joblib/joblib/statuses/{sha}","languages_url":"https://api.github.com/repos/joblib/joblib/languages","stargazers_url":"https://api.github.com/repos/joblib/joblib/stargazers","contributors_url":"https://api.github.com/repos/joblib/joblib/contributors","subscribers_url":"https://api.github.com/repos/joblib/joblib/subscribers","subscription_url":"https://api.github.com/repos/joblib/joblib/subscription","commits_url":"https://api.github.com/repos/joblib/joblib/commits{/sha}","git_commits_url":"https://api.github.com/repos/joblib/joblib/git/commits{/sha}","comments_url":"https://api.github.com/repos/joblib/joblib/comments{/number}","issue_comment_url":"https://api.github.com/repos/joblib/joblib/issues/comments{/number}","contents_url":"https://api.github.com/repos/joblib/joblib/contents/{+path}","compare_url":"https://api.github.com/repos/joblib/joblib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joblib/joblib/merges","archive_url":"https://api.github.com/repos/joblib/joblib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joblib/joblib/downloads","issues_url":"https://api.github.com/repos/joblib/joblib/issues{/number}","pulls_url":"https://api.github.com/repos/joblib/joblib/pulls{/number}","milestones_url":"https://api.github.com/repos/joblib/joblib/milestones{/number}","notifications_url":"https://api.github.com/repos/joblib/joblib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joblib/joblib/labels{/name}","releases_url":"https://api.github.com/repos/joblib/joblib/releases{/id}","deployments_url":"https://api.github.com/repos/joblib/joblib/deployments","created_at":"2010-05-07T06:48:26Z","updated_at":"2016-12-10T22:37:04Z","pushed_at":"2016-12-13T10:53:11Z","git_url":"git://github.com/joblib/joblib.git","ssh_url":"git@github.com:joblib/joblib.git","clone_url":"https://github.com/joblib/joblib.git","svn_url":"https://github.com/joblib/joblib","homepage":"http://packages.python.org/joblib/","size":3669,"stargazers_count":800,"watchers_count":800,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"open_issues_count":114,"forks":123,"open_issues":114,"watchers":800,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/joblib/joblib/pulls/454"},"html":{"href":"https://github.com/joblib/joblib/pull/454"},"issue":{"href":"https://api.github.com/repos/joblib/joblib/issues/454"},"comments":{"href":"https://api.github.com/repos/joblib/joblib/issues/454/comments"},"review_comments":{"href":"https://api.github.com/repos/joblib/joblib/pulls/454/comments"},"review_comment":{"href":"https://api.github.com/repos/joblib/joblib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joblib/joblib/pulls/454/commits"},"statuses":{"href":"https://api.github.com/repos/joblib/joblib/statuses/4609bd3c04cff67db2abe08de28af22a7df16362"}}}}
{"actor":{"display_login":"karandesai-96"}}