Skip to content

Commit ae9d436

Browse files
committed
adjust test
1 parent 16556c5 commit ae9d436

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

tests/bifacial/test_infinite_sheds.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,20 @@ def test_system():
4242

4343

4444
def test__poa_ground_shadows():
45-
poa_ground, f_gnd_beam, df, vf_gnd_sky = (300., 0.5, 0.5, 0.2)
46-
result = infinite_sheds._poa_ground_shadows(
47-
poa_ground, f_gnd_beam, df, vf_gnd_sky)
48-
expected = 300. * (0.5 * 0.5 + 0.5 * 0.2)
45+
ghi, dhi, albedo, f_gnd_beam, vf_gnd_sky = (300., 100, 0.3, 0.5, 0.2)
46+
result = infinite_sheds._poa_ground_shadows(ghi, dhi, albedo, f_gnd_beam,
47+
vf_gnd_sky)
48+
49+
expected = 0.3 * (200 * 0.5 + 100 * 0.2)
4950
assert np.isclose(result, expected)
5051
# vector inputs
51-
poa_ground = np.array([300., 300.])
52-
f_gnd_beam = np.array([0.5, 0.5])
53-
df = np.array([0.5, 0.])
54-
vf_gnd_sky = np.array([0.2, 0.2])
55-
result = infinite_sheds._poa_ground_shadows(
56-
poa_ground, f_gnd_beam, df, vf_gnd_sky)
57-
expected_vec = np.array([expected, 300. * 0.5])
52+
ghi = np.array([ghi, ghi])
53+
dhi = np.array([dhi, 0])
54+
f_gnd_beam = np.array([f_gnd_beam, f_gnd_beam])
55+
vf_gnd_sky = np.array([vf_gnd_sky, vf_gnd_sky])
56+
result = infinite_sheds._poa_ground_shadows(ghi, dhi, albedo, f_gnd_beam,
57+
vf_gnd_sky)
58+
expected_vec = np.array([expected, 300. * 0.5 * 0.3])
5859
assert np.allclose(result, expected_vec)
5960

6061

0 commit comments

Comments
 (0)