-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: Remove broken test for deprecated functionality #38707
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: Remove broken test for deprecated functionality #38707
Conversation
Registering converters by default is deprecated since GH28722. The test did not fail as the subprocess call contains errors in the python code.
can u fix the test instead |
How would you want this test fixed? There is a test for registering the converters explicitly. I don't know what case still needs to be tested with this after converters are no longer automatically registered. |
this is a test that is using a sub process so it's different - it makes sure that we are not corrupting things in import |
As far as my understanding went, there is nothing converter related done on import anymore. That's why I thought the test is no longer needed. But you are suggesting that something about the imports still needs to have a test. |
def test_register_by_default(self): | ||
# Run in subprocess to ensure a clean state | ||
code = ( | ||
"'import matplotlib.units; " |
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.
if you fix the quoting here, does this test pass?
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.
No, the assertion will fail then. Converters for pd.Timestamp
and others are not added to units anymore on import
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.
ahh ok, then this is a truly test in need of removal (that was what i am confirming. thanks
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.
though i think having this test that the converters are NOT registered would actually be fine here, e.g. reverse the test as this functionaility is removed. The reason we are doing this in a subprocess as its very easy to have the ordering of imports change whether the converters is registered or not.
so we can remove the test, or better yet, to fix it and assert that pd.Timestamp is NOT added would be great.
thanks @theOehrly |
Registering converters by default on import is deprecated since #28722.
The test did not fail as the subprocess call contains errors in the python code. Specifically, the code is in double and single quotes. This means that the python code passed to the subprocess call is never actually excecuted. Python in the subprocess is called to "excecute" a string. This is will simply finish with exit code 0 as there is nothing to do basically.
Additonally, the test code contains a stray closing bracket at the end which would make the code fail if it was excecuted.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff