-
-
Notifications
You must be signed in to change notification settings - Fork 141
for gh-468 #477
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
for gh-468 #477
Conversation
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.
I don't think we want to use a decorator on top of a test function, but rather have something that lets us skip running a particular line of code based on the version so that we can keep the offending lines rather isolated.
So, for example, this test in test_scalars.py
is failing:
check(assert_type(p + offset_index, pd.PeriodIndex), pd.PeriodIndex)
It is failing because in the future the result will be a pd.Index
. So we will leave the typing alone, but need to change what is passed to check()
based on the version number.
Other tests are changing because of date/time parsing, in which case the warnings have to be checked based on the version number.
@@ -136,3 +136,21 @@ def pytest_warns_bounded( | |||
return nullcontext() | |||
else: | |||
return suppress(upper_exception) | |||
|
|||
|
|||
def nigthly_test_skip( |
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.
nightly
is misspelled
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.
i'll correct it
What is to be done is check a test on the version speicifed and check other test normally, have I understood it correctly |
Do the test as it is now if the version is 1.5.x, and use the new result if the version is later than that. Also have to deal with the datetime failures, since that warning has changed. |
closing in favor of #485 |
assert_type()
to assert the type of any return valuewanted some discussion about what could the return type for the func