Skip to content

Commit d02923f

Browse files
committed
add explicit args
1 parent 959a916 commit d02923f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pvlib/tests/ivtools/test_sdm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import numpy as np
22
import pandas as pd
3-
from scipy import optimize
3+
from scipy import optimize, constants
44

55
import pytest
66
from numpy.testing import assert_allclose
@@ -85,12 +85,14 @@ def test_fit_desoto_init_guess(mocker):
8585
init_guess = {k: v for k, v in zip(
8686
['IL_0', 'Io_0', 'Rs_0', 'Rsh_0', 'a_0'], init_guess_array)}
8787
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
8890
root_args = {} # to fill out call for test
8991
result, _ = sdm.fit_desoto(v_mp=31.0, i_mp=8.71, v_oc=38.3, i_sc=9.43,
9092
alpha_sc=0.005658, beta_voc=-0.13788,
9193
cells_in_series=60, init_guess=init_guess)
9294
optimize.root.assert_called_once_with(mocker.ANY, x0=init_guess_array,
93-
args=mocker.ANY, **root_args)
95+
args=specs, **root_args)
9496

9597

9698
def test_fit_desoto_failure():

0 commit comments

Comments
 (0)