|
1 | 1 | import numpy as np |
2 | 2 | import pandas as pd |
3 | | -from scipy import optimize |
| 3 | +from scipy import optimize, constants |
4 | 4 |
|
5 | 5 | import pytest |
6 | 6 | from numpy.testing import assert_allclose |
@@ -85,12 +85,14 @@ def test_fit_desoto_init_guess(mocker): |
85 | 85 | init_guess = {k: v for k, v in zip( |
86 | 86 | ['IL_0', 'Io_0', 'Rs_0', 'Rsh_0', 'a_0'], init_guess_array)} |
87 | 87 | mocker.spy(optimize, 'root') |
| 88 | + specs = (9.43, 38.3, 8.71, 31.0, -0.13788, 0.005658, 1.121, -0.0002677, |
| 89 | + 25, constants.k) # for test |
88 | 90 | root_args = {} # to fill out call for test |
89 | 91 | result, _ = sdm.fit_desoto(v_mp=31.0, i_mp=8.71, v_oc=38.3, i_sc=9.43, |
90 | 92 | alpha_sc=0.005658, beta_voc=-0.13788, |
91 | 93 | cells_in_series=60, init_guess=init_guess) |
92 | 94 | optimize.root.assert_called_once_with(mocker.ANY, x0=init_guess_array, |
93 | | - args=mocker.ANY, **root_args) |
| 95 | + args=specs, **root_args) |
94 | 96 |
|
95 | 97 |
|
96 | 98 | def test_fit_desoto_failure(): |
|
0 commit comments