{"action":"created","comment":{"url":"https://api.github.com/repos/pydata/pandas/pulls/comments/38522594","id":38522594,"diff_hunk":"@@ -91,266 +86,173 @@ def read_csv(self, *args, **kwds):\n         kwds['engine'] = 'python'\n         return read_csv(*args, **kwds)\n \n+    def get_data(self, basename, csv=True):\n+        \"\"\"\n+        Return a DataFrame as read by the Python csv engine and a DataFrame\n+        as read by the ExcelFile engine. Test data path is defined by\n+        pandas.util.testing.get_data_path()\n+\n+        Parameters\n+        ----------\n+\n+        basename : str\n+            File base name, excluding file extension.\n+\n+        csv : boolean, default=True\n+            When True, basename.csv is returned\n+        \"\"\"\n+\n+        excel = ExcelFile(os.path.join(self.dirpath, basename + self.ext))\n+        if csv:\n+            # the reference is obtained form read_csv with Python engine\n+            pref = os.path.join(self.dirpath, basename + '.csv')\n+            dfref = self.read_csv(pref, index_col=0, parse_dates=True)\n+            return dfref, excel\n+        else:\n+            return excel\n+\n+\n+class ReadingTestsBase(SharedItems):\n+    # This is based on ExcelWriterBase\n+    #\n+    # Base class for test cases to run with different Excel readers.\n+    # To add a reader test, define the following:\n+    # 1. A check_skip function that skips your tests if your reader isn't\n+    #    installed.\n+    # 2. Add a property ext, which is the file extension that your reader\n+    #    reades from. (needs to start with '.' so it's a valid path)\n+    # 3. Add a property engine_name, which is the name of the reader class.\n+    #    For the reader this is not used for anything at the moment.\n+\n+    def setUp(self):\n+        self.check_skip()\n+        super(ReadingTestsBase, self).setUp()\n \n-class ExcelReaderTests(SharedItems, tm.TestCase):\n     def test_parse_cols_int(self):\n-        _skip_if_no_openpyxl()\n-        _skip_if_no_xlrd()\n ","path":"pandas/io/tests/test_excel.py","position":62,"original_position":62,"commit_id":"8a74d5061dfc9be136ffb97ea3ca09841e9980a1","original_commit_id":"8a74d5061dfc9be136ffb97ea3ca09841e9980a1","user":{"login":"jreback","id":953992,"avatar_url":"https://avatars.githubusercontent.com/u/953992?v=3","gravatar_id":"","url":"https://api.github.com/users/jreback","html_url":"https://github.com/jreback","followers_url":"https://api.github.com/users/jreback/followers","following_url":"https://api.github.com/users/jreback/following{/other_user}","gists_url":"https://api.github.com/users/jreback/gists{/gist_id}","starred_url":"https://api.github.com/users/jreback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jreback/subscriptions","organizations_url":"https://api.github.com/users/jreback/orgs","repos_url":"https://api.github.com/users/jreback/repos","events_url":"https://api.github.com/users/jreback/events{/privacy}","received_events_url":"https://api.github.com/users/jreback/received_events","type":"User","site_admin":false},"body":"aren't ``.xls``,``.xlsx``,``.xlsm`` different formats with the same data?","created_at":"2015-09-02T11:41:44Z","updated_at":"2015-09-02T11:41:44Z","html_url":"https://github.com/pydata/pandas/pull/10964#discussion_r38522594","pull_request_url":"https://api.github.com/repos/pydata/pandas/pulls/10964","_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments/38522594"},"html":{"href":"https://github.com/pydata/pandas/pull/10964#discussion_r38522594"},"pull_request":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10964"}}},"pull_request":{"url":"https://api.github.com/repos/pydata/pandas/pulls/10964","id":43922886,"html_url":"https://github.com/pydata/pandas/pull/10964","diff_url":"https://github.com/pydata/pandas/pull/10964.diff","patch_url":"https://github.com/pydata/pandas/pull/10964.patch","issue_url":"https://api.github.com/repos/pydata/pandas/issues/10964","number":10964,"state":"open","locked":false,"title":"TST: refactored Excel reader tests","user":{"login":"davidovitch","id":2007257,"avatar_url":"https://avatars.githubusercontent.com/u/2007257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidovitch","html_url":"https://github.com/davidovitch","followers_url":"https://api.github.com/users/davidovitch/followers","following_url":"https://api.github.com/users/davidovitch/following{/other_user}","gists_url":"https://api.github.com/users/davidovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/davidovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidovitch/subscriptions","organizations_url":"https://api.github.com/users/davidovitch/orgs","repos_url":"https://api.github.com/users/davidovitch/repos","events_url":"https://api.github.com/users/davidovitch/events{/privacy}","received_events_url":"https://api.github.com/users/davidovitch/received_events","type":"User","site_admin":false},"body":"This PR implements more flexible Excel (spreadsheet) reader tests. The work was originally part of the larger but unsuccessful PR #9070. \r\n\r\nThis PR includes:\r\n* Excel reader base class tests to facilitate adding the similar tests for other readers\r\n* not all Excel file formats (xls, xlsm, xlsx) had a corresponding test file. This PR adds the missing ones. Consequently, all Excel data files are now tested against all 3 Excel file formats.\r\n* rename ```test``` to ```test1``` (for xls, xlsm, xlsx extensions) for consistency with ```test2..4``` test data files. This also means that before merging (but after Travis has ran the tests) the URL of Excel test file ```test1.*``` has to be changed from ```davidovitch/pandas``` to ```pydata/pandas``` in ```pandas/io/tests/test_excel.py``` at line [378](https://github.com/davidovitch/pandas/blob/master/pandas/io/tests/test_excel.py#L378).","created_at":"2015-09-01T20:32:15Z","updated_at":"2015-09-02T11:41:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7e6962cbedc25e57a12489f844ff641ca4794f3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pydata/pandas/pulls/10964/commits","review_comments_url":"https://api.github.com/repos/pydata/pandas/pulls/10964/comments","review_comment_url":"https://api.github.com/repos/pydata/pandas/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pydata/pandas/issues/10964/comments","statuses_url":"https://api.github.com/repos/pydata/pandas/statuses/8a74d5061dfc9be136ffb97ea3ca09841e9980a1","head":{"label":"davidovitch:master","ref":"master","sha":"8a74d5061dfc9be136ffb97ea3ca09841e9980a1","user":{"login":"davidovitch","id":2007257,"avatar_url":"https://avatars.githubusercontent.com/u/2007257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidovitch","html_url":"https://github.com/davidovitch","followers_url":"https://api.github.com/users/davidovitch/followers","following_url":"https://api.github.com/users/davidovitch/following{/other_user}","gists_url":"https://api.github.com/users/davidovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/davidovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidovitch/subscriptions","organizations_url":"https://api.github.com/users/davidovitch/orgs","repos_url":"https://api.github.com/users/davidovitch/repos","events_url":"https://api.github.com/users/davidovitch/events{/privacy}","received_events_url":"https://api.github.com/users/davidovitch/received_events","type":"User","site_admin":false},"repo":{"id":27941103,"name":"pandas","full_name":"davidovitch/pandas","owner":{"login":"davidovitch","id":2007257,"avatar_url":"https://avatars.githubusercontent.com/u/2007257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidovitch","html_url":"https://github.com/davidovitch","followers_url":"https://api.github.com/users/davidovitch/followers","following_url":"https://api.github.com/users/davidovitch/following{/other_user}","gists_url":"https://api.github.com/users/davidovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/davidovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidovitch/subscriptions","organizations_url":"https://api.github.com/users/davidovitch/orgs","repos_url":"https://api.github.com/users/davidovitch/repos","events_url":"https://api.github.com/users/davidovitch/events{/privacy}","received_events_url":"https://api.github.com/users/davidovitch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/davidovitch/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":true,"url":"https://api.github.com/repos/davidovitch/pandas","forks_url":"https://api.github.com/repos/davidovitch/pandas/forks","keys_url":"https://api.github.com/repos/davidovitch/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidovitch/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidovitch/pandas/teams","hooks_url":"https://api.github.com/repos/davidovitch/pandas/hooks","issue_events_url":"https://api.github.com/repos/davidovitch/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/davidovitch/pandas/events","assignees_url":"https://api.github.com/repos/davidovitch/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/davidovitch/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/davidovitch/pandas/tags","blobs_url":"https://api.github.com/repos/davidovitch/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidovitch/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidovitch/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidovitch/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidovitch/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/davidovitch/pandas/languages","stargazers_url":"https://api.github.com/repos/davidovitch/pandas/stargazers","contributors_url":"https://api.github.com/repos/davidovitch/pandas/contributors","subscribers_url":"https://api.github.com/repos/davidovitch/pandas/subscribers","subscription_url":"https://api.github.com/repos/davidovitch/pandas/subscription","commits_url":"https://api.github.com/repos/davidovitch/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidovitch/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidovitch/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidovitch/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidovitch/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/davidovitch/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidovitch/pandas/merges","archive_url":"https://api.github.com/repos/davidovitch/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidovitch/pandas/downloads","issues_url":"https://api.github.com/repos/davidovitch/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/davidovitch/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/davidovitch/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/davidovitch/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidovitch/pandas/labels{/name}","releases_url":"https://api.github.com/repos/davidovitch/pandas/releases{/id}","created_at":"2014-12-12T22:41:43Z","updated_at":"2015-04-30T09:05:29Z","pushed_at":"2015-09-01T20:51:36Z","git_url":"git://github.com/davidovitch/pandas.git","ssh_url":"git@github.com:davidovitch/pandas.git","clone_url":"https://github.com/davidovitch/pandas.git","svn_url":"https://github.com/davidovitch/pandas","homepage":"http://pandas.pydata.org","size":62141,"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":"pydata:master","ref":"master","sha":"9bdae60eca392877a0fbca4e671466f28bc8a0d9","user":{"login":"pydata","id":1284191,"avatar_url":"https://avatars.githubusercontent.com/u/1284191?v=3","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"repo":{"id":858127,"name":"pandas","full_name":"pydata/pandas","owner":{"login":"pydata","id":1284191,"avatar_url":"https://avatars.githubusercontent.com/u/1284191?v=3","gravatar_id":"","url":"https://api.github.com/users/pydata","html_url":"https://github.com/pydata","followers_url":"https://api.github.com/users/pydata/followers","following_url":"https://api.github.com/users/pydata/following{/other_user}","gists_url":"https://api.github.com/users/pydata/gists{/gist_id}","starred_url":"https://api.github.com/users/pydata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pydata/subscriptions","organizations_url":"https://api.github.com/users/pydata/orgs","repos_url":"https://api.github.com/users/pydata/repos","events_url":"https://api.github.com/users/pydata/events{/privacy}","received_events_url":"https://api.github.com/users/pydata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pydata/pandas","description":"Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more","fork":false,"url":"https://api.github.com/repos/pydata/pandas","forks_url":"https://api.github.com/repos/pydata/pandas/forks","keys_url":"https://api.github.com/repos/pydata/pandas/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pydata/pandas/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pydata/pandas/teams","hooks_url":"https://api.github.com/repos/pydata/pandas/hooks","issue_events_url":"https://api.github.com/repos/pydata/pandas/issues/events{/number}","events_url":"https://api.github.com/repos/pydata/pandas/events","assignees_url":"https://api.github.com/repos/pydata/pandas/assignees{/user}","branches_url":"https://api.github.com/repos/pydata/pandas/branches{/branch}","tags_url":"https://api.github.com/repos/pydata/pandas/tags","blobs_url":"https://api.github.com/repos/pydata/pandas/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pydata/pandas/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pydata/pandas/git/refs{/sha}","trees_url":"https://api.github.com/repos/pydata/pandas/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pydata/pandas/statuses/{sha}","languages_url":"https://api.github.com/repos/pydata/pandas/languages","stargazers_url":"https://api.github.com/repos/pydata/pandas/stargazers","contributors_url":"https://api.github.com/repos/pydata/pandas/contributors","subscribers_url":"https://api.github.com/repos/pydata/pandas/subscribers","subscription_url":"https://api.github.com/repos/pydata/pandas/subscription","commits_url":"https://api.github.com/repos/pydata/pandas/commits{/sha}","git_commits_url":"https://api.github.com/repos/pydata/pandas/git/commits{/sha}","comments_url":"https://api.github.com/repos/pydata/pandas/comments{/number}","issue_comment_url":"https://api.github.com/repos/pydata/pandas/issues/comments{/number}","contents_url":"https://api.github.com/repos/pydata/pandas/contents/{+path}","compare_url":"https://api.github.com/repos/pydata/pandas/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pydata/pandas/merges","archive_url":"https://api.github.com/repos/pydata/pandas/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pydata/pandas/downloads","issues_url":"https://api.github.com/repos/pydata/pandas/issues{/number}","pulls_url":"https://api.github.com/repos/pydata/pandas/pulls{/number}","milestones_url":"https://api.github.com/repos/pydata/pandas/milestones{/number}","notifications_url":"https://api.github.com/repos/pydata/pandas/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pydata/pandas/labels{/name}","releases_url":"https://api.github.com/repos/pydata/pandas/releases{/id}","created_at":"2010-08-24T01:37:33Z","updated_at":"2015-09-02T09:13:49Z","pushed_at":"2015-09-02T11:34:52Z","git_url":"git://github.com/pydata/pandas.git","ssh_url":"git@github.com:pydata/pandas.git","clone_url":"https://github.com/pydata/pandas.git","svn_url":"https://github.com/pydata/pandas","homepage":"http://pandas.pydata.org","size":157043,"stargazers_count":4878,"watchers_count":4878,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1872,"mirror_url":null,"open_issues_count":1466,"forks":1872,"open_issues":1466,"watchers":4878,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10964"},"html":{"href":"https://github.com/pydata/pandas/pull/10964"},"issue":{"href":"https://api.github.com/repos/pydata/pandas/issues/10964"},"comments":{"href":"https://api.github.com/repos/pydata/pandas/issues/10964/comments"},"review_comments":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10964/comments"},"review_comment":{"href":"https://api.github.com/repos/pydata/pandas/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pydata/pandas/pulls/10964/commits"},"statuses":{"href":"https://api.github.com/repos/pydata/pandas/statuses/8a74d5061dfc9be136ffb97ea3ca09841e9980a1"}}}}