-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: skip gbq test again / fix parsers/test_network url #15407
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
Conversation
@@ -15,42 +15,32 @@ | |||
from pandas.io.parsers import read_csv, read_table | |||
|
|||
|
|||
class TestCompressedUrl(object): | |||
@pytest.fixture | |||
def salaries_table(scope='module'): |
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.
scope
goes on the decorator, not the function.
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.
thanks, that was a typo!
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.
odd linter didn't even catch that
@@ -17,5 +17,5 @@ def pytest_runtest_setup(item): | |||
if 'slow' not in item.keywords and item.config.getoption("--only-slow"): | |||
pytest.skip("skipping due to --only-slow") | |||
|
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.
@TomAugspurger FYI
@pytest.mark.parametrize( | ||
"compression,extension", [('gzip', '.gz'), ('bz2', '.bz2'), | ||
('zip', '.zip'), ('xz', '.xz')]) | ||
def test_compressed_urls(salaries_table, compression, extension): |
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.
@TomAugspurger I had to do this in an odd way (meaning having the parameterized fixed call another function)
as the @tm.network
decorator doesn't play nice in python 2 ONLY. It works in python 3 though.
any idea?
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.
IIRC, decorators need to fully copy the whole argument signature. This is not too bad on Python 3.4+ because functools.wraps
does it already, but it's a bit of a pain on 2.7. The easiest is to use the decorator
package, though on matplotlib
, I just replaced the decorators like that with an automatic fixture and some markers.
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.
@QuLogic thanks for the expl.
yeah I think we need to fix tm.network
and just make it a marker.. Though if you have suggestions pls speak up! (or just do a PR!).
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.
so you just use decorator.decorator
instead of functools.wraps
?
if its only for testing purposes, then we could easily do that (though even easier would be to fix our tm.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.
The syntax of decorator.decorator
is a bit different; it replaces the outer function portion and you only need the wrapper bit, but I didn't pursue it much further.
No description provided.