- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 19.2k
TST: Use pytest #13856
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST: Use pytest #13856
Changes from all commits
9b5f2b2
              c8dc927
              a638390
              b268d89
              c4f6008
              14c447c
              9ba1f12
              40d7336
              42790ae
              03695aa
              59e2be9
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,6 @@ | ||
| nose | ||
| pytest | ||
| pytest-cov | ||
| flake8 | ||
| sphinx | ||
| ipython | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -3,4 +3,6 @@ pytz | |
| numpy | ||
| cython | ||
| nose | ||
| pytest | ||
| pytest-cov | ||
| flake8 | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -28,7 +28,7 @@ class TestPDApi(Base, tm.TestCase): | |
|  | ||
| # these are optionally imported based on testing | ||
| # & need to be ignored | ||
| ignored = ['tests', 'locale'] | ||
| ignored = ['tests', 'locale', 'conftest'] | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need to take this out | ||
|  | ||
| # top-level sub-packages | ||
| lib = ['api', 'compat', 'computation', 'core', | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import pytest | ||
|  | ||
|  | ||
| def pytest_addoption(parser): | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should for sure be in the top-level and not here There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't like where it's at now either, but I think it's necessary. As this note says: 
 The other option, I suppose is to bundle a setuptools entrypoint so that our custom options show up for anyone who has pytest and pandas. We could prefix our  Do you have a preference between the two? | ||
| parser.addoption("--skip-slow", action="store_true", | ||
| help="skip slow tests") | ||
| parser.addoption("--skip-network", action="store_true", | ||
| help="run network tests") | ||
| parser.addoption("--only-slow", action="store_true", | ||
| help="run only slow tests") | ||
|  | ||
|  | ||
| def pytest_runtest_setup(item): | ||
| if 'slow' in item.keywords and item.config.getoption("--skip-slow"): | ||
| pytest.skip("skipping due to --skip-slow") | ||
|  | ||
| if 'slow' not in item.keywords and item.config.getoption("--only-slow"): | ||
| pytest.skip("skipping due to --only-slow") | ||
|  | ||
| if 'skip' in item.keywords and item.config.getoption("--skip-network"): | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. on the todo list, let's just make  | ||
| pytest.skip("skipping due to --skip-network") | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prob should take out this tag