We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ce8e1a commit 451d1b1Copy full SHA for 451d1b1
pvlib/tests/test_ivtools.py
@@ -93,13 +93,19 @@ def test_fit_sdm_cec_sam(get_cec_params_cansol_cs5p_220p):
93
modeled['R_s'] = R_s
94
modeled['Adjust'] = Adjust
95
assert np.allclose(modeled.values, expected.values, rtol=5e-2)
96
- # test for fitting failure
+
97
98
+@requires_pysam
99
+def test_fit_sdm_cec_sam_estimation_failure():
100
+ """
101
+ Failing to estimate the parameters for the CEC SDM model should raise an
102
+ exception.
103
104
with pytest.raises(RuntimeError):
- I_L_ref, I_o_ref, R_sh_ref, R_s, a_ref, Adjust = \
- ivtools.fit_sdm_cec_sam(
- celltype='polySi', v_mp=0.45, i_mp=5.25, v_oc=0.55, i_sc=5.5,
- alpha_sc=0.00275, beta_voc=0.00275, gamma_pmp=0.0055,
- cells_in_series=1, temp_ref=25)
105
+ ivtools.fit_sdm_cec_sam(
106
+ celltype='polySi', v_mp=0.45, i_mp=5.25, v_oc=0.55, i_sc=5.5,
107
+ alpha_sc=0.00275, beta_voc=0.00275, gamma_pmp=0.0055,
108
+ cells_in_series=1, temp_ref=25)
109
110
111
@requires_scipy
0 commit comments