Skip to content

Commit 6e07565

Browse files
cwhanseechedey-ls
andauthored
Fix test for _fit_sandia_cocontent (#2615)
* correct argument and value order * whatsnew * move note to Testing section * Update docs/sphinx/source/whatsnew/v0.13.2.rst Co-authored-by: Echedey Luis <[email protected]> --------- Co-authored-by: Echedey Luis <[email protected]>
1 parent cc75255 commit 6e07565

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/sphinx/source/whatsnew/v0.13.2.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Deprecations
1818
Bug fixes
1919
~~~~~~~~~
2020

21-
2221
Enhancements
2322
~~~~~~~~~~~~
2423
* Add :py:func:`~pvlib.ivtools.sdm.fit_desoto_batzelis`, a function to estimate
@@ -56,6 +55,8 @@ Testing
5655
* Add Python 3.14 to test suite. (:pull:`2590`)
5756
* Update pytest configuration in ``pyproject.toml`` to work with pytest 9.0.
5857
(:pull:`2596`)
58+
* Correct argument and value order in :py:func:`~pvlib.tests.ivtools.test_sde`,
59+
in tests of :py:func:`~pvlib.ivtools.sde._fit_sandia_cocontent`. (:issue:`2613`, :pull:`2615`)
5960

6061

6162
Benchmarking

tests/ivtools/test_sde.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ def test_fit_sandia_simple_bad_iv(get_bad_iv_curves):
5757
(np.array([3., 2.9, 2.8, 2.7, 2.6, 2.5, 2.4, 1.7, 0.8, 0.]),
5858
np.array([0., 0.2, 0.4, 0.6, 0.8, 1., 1.2, 1.4, 1.45, 1.5]),
5959
10.,
60-
(2.3392, 11.6865, -.232, -.2596, -.7119)),
60+
(2.3392, 11.6865, -.2596, -.232, -.7119)),
6161
(np.array(
6262
[5., 4.9, 4.8, 4.7, 4.6, 4.5, 4.4, 4.3, 4.2, 4.1, 4., 3.8, 3.5, 1.7,
6363
0.]),
6464
np.array(
6565
[0., .1, .2, .3, .4, .5, .6, .7, .8, .9, 1., 1.1, 1.18, 1.2, 1.22]),
6666
15.,
67-
(-22.0795, 27.1196, -4.2076, -.0056, -.0498))])
67+
(-22.0795, 27.1196, -.0056, -4.2076, -.0498))])
6868
def test__fit_sandia_cocontent(i, v, nsvth, expected):
6969
# test confirms agreement with Matlab code. The returned parameters
7070
# are nonsense
71-
iph, io, rsh, rs, n = sde._fit_sandia_cocontent(v, i, nsvth)
71+
iph, io, rs, rsh, n = sde._fit_sandia_cocontent(v, i, nsvth)
7272
np.testing.assert_allclose(iph, np.array(expected[0]), atol=.0001)
7373
np.testing.assert_allclose(io, np.array([expected[1]]), atol=.0001)
7474
np.testing.assert_allclose(rs, np.array([expected[2]]), atol=.0001)

0 commit comments

Comments
 (0)