8000 Use pandas wrapper functions for the test suite by kandersolar · Pull Request #1021 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content

Use pandas wrapper functions for the test suite #1021

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

Merged
merged 7 commits into from
Aug 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update wrappers
  • Loading branch information
kandersolar committed Aug 6, 2020
commit 023ea0b806005a1e546fffe243be542085f9bcf1
16 changes: 8 additions & 8 deletions pvlib/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,25 @@ def inner(*args, **kwargs):
return wrapper


# custom test function that handles the change in default
# custom test function that handles the change in API related to default
# tolerances in pandas 1.1.0. See pvlib GH #1018
def assert_series_equal(left, right, **kwargs):
if parse_version(pd.__version__) >= parse_version('1.1.0'):
kwargs.pop('check_less_precise')
kwargs.pop('check_less_precise', None)
else:
kwargs.pop('rtol')
kwargs.pop('atol')
kwargs.pop('rtol', None)
kwargs.pop('atol', None)
pd.testing.assert_series_equal(left, right, **kwargs)


# custom test function that handles the change in default
# custom test function that handles the change in API related to default
# tolerances in pandas 1.1.0. See pvlib GH #1018
def assert_frame_equal(left, right, **kwargs):
if parse_version(pd.__version__) >= parse_version('1.1.0'):
kwargs.pop('check_less_precise')
kwargs.pop('check_less_precise', None)
else:
kwargs.pop('rtol')
kwargs.pop('atol')
kwargs.pop('rtol', None)
kwargs.pop('atol', None)
pd.testing.assert_frame_equal(left, right, **kwargs)


Expand Down
0