Skip to content

Handle kwargs for ModelChain.noct_sam_celltemp #1198

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 4 commits into from
Mar 16, 2021

Conversation

cwhanse
Copy link
Member

@cwhanse cwhanse commented Mar 16, 2021

  • [ ] Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

Follow-on to #1195, closes the issue discussed here.

Comment on lines 723 to 724
assert m_noct_sam.call_args.kwargs == {
'effective_irradiance': mc.results.effective_irradiance}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert m_noct_sam.call_args.kwargs == {
'effective_irradiance': mc.results.effective_irradiance}
assert m_noct_sam.call_args[1] == {
'effective_irradiance': mc.results.effective_irradiance}

Copy link
Member

@wholmgren wholmgren Mar 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call_args.kwargs was added in python 3.8, so you have to use the old style look up for the older supported versions. If this doesn't work try

assert_series_equal(m_noct_sam.call_args[1]['effective_irradiance'], mc.results.effective_irradiance)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I was puzzled by the disconnect between pytest docs and the results, didn't think to check versions.

@cwhanse cwhanse added the bug label Mar 16, 2021
@cwhanse cwhanse added this to the 0.9.0 milestone Mar 16, 2021
@wholmgren wholmgren merged commit 652a3ba into pvlib:master Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants