-
-
Notifications
You must be signed in to change notification settings - Fork 155
MAINT: #1503 deduplicate tests/__init__.py
#1508
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
MAINT: #1503 deduplicate tests/__init__.py
#1508
Conversation
loicdiridollou
left a comment
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.
Two minor things so I understand better, good otherwise!
tests/series/test_series_float.py
Outdated
|
|
||
| @pytest.mark.parametrize(("dtype", "target_dtype"), TYPE_FLOAT_ARGS.items()) | ||
| def test_constructor_dtype(dtype: FloatDtypeArg, target_dtype: type) -> None: | ||
| def test_constructor_dtype(dtype: "FloatDtypeArg", target_dtype: type) -> None: |
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.
What is the change in behavior so that we need to put this in quotes?
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.
Actually unnecessary, 3a50508
tests/_typing.py
Outdated
| @@ -0,0 +1,84 @@ | |||
| # Committed content should be import-only. At runtime of tests, this file will | |||
| # be replaced by pandas-stubs/_typing.pyi. | |||
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.
How is this replacement going to work?
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.
Explained in more detail in d6c22b7
This file serves as a stub file for static type checkers (pyright does not like it if I call the file tests/_typing.pyi).
In tests/conftest.py, this file is copied to tests/_typing.pyi, and pandas-stubs/_typing.pyi is copied to tests/_typing.py.
After tests are done, tests/_typing.pyi is copied back to pandas-stubs/_typing.pyi.
|
(sorry I may have accidentally closed the PR) |
loicdiridollou
left a comment
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.
All good, thanks a lot @cmp0xff!
* GH1432 Partial resolution * GH1432 PR Feedback * type Index methods: putmask, asof, asof_locs, sort_values, get_indexer_non_unique, get_indexer_for, map, get_slice_bound (#1505) * type Index methods: putmask, asof, asof_locs, sort_values, get_indexer_non_unique, get_indexer_for, map, get_slice_bound * remove redundant `IntervalIndexer.get_indexer_non_unique` * slice_locs can return either `np.integer` or `int` * fix slice_locs test * Apply suggestions from code review Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com> * np.integer -> np.intp * test more mask types for `putmask` * Apply suggestions from code review Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com> * test asof with str --------- Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com> * GH1432 PR Feedback * FIX: #1508 numpy 1darrays in tests (#1512) fix: #1508 numpy arrays in tests * GH1484 Upgrade ty (#1509) * GH1484 Upgrade ty * GH1484 Fix formatting * GH1484 Update PR * GH1432 Partial resolution * GH1432 PR Feedback * Update tests/test_timefuncs.py Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com> --------- Co-authored-by: Marco Edward Gorelli <33491632+MarcoGorelli@users.noreply.github.com> Co-authored-by: Yi-Fan Wang <cmp0xff@users.noreply.github.com>
_typing.pyiandtests/__init__.py#1503