8000 `test_irradiance.py::test_get_ground_diffuse_albedo_0` test assertion is incorrect · Issue #1569 · pvlib/pvlib-python · GitHub
[go: up one dir, main page]

Skip to content
test_irradiance.py::test_get_ground_diffuse_albedo_0 test assertion is incorrect #1569
Closed
@kandersolar

Description

@kandersolar

This test is not asserting what it should be:

def test_get_ground_diffuse_albedo_0(irrad_data):
ground_irrad = irradiance.get_ground_diffuse(
40, irrad_data['ghi'], albedo=0)
assert 0 == ground_irrad.all()

In effect, this is asserting that there is at least one zero in ground_irrad. I assume the intent of the test is to assert that ground_irrad contains all zeros. The fix is easy, just edit line 136 to be assert (0 == ground_irrad).all().

PRs welcome, especially from new contributors!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0