Skip to content

Commit 7fafac1

Browse files
committed
add singlediode ivcurve_pnts deprecation warning test
1 parent 3f69340 commit 7fafac1

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

docs/examples/iv-modeling/plot_singlediode.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
# -----------------------
3030
# This example uses :py:meth:`pvlib.pvsystem.calcparams_desoto` to calculate
3131
# the 5 electrical parameters needed to solve the single-diode equation.
32-
# :py:meth:`pvlib.pvsystem.singlediode` and :py:meth:`pvlib.pvsystem.i_from_v` are used to generate the IV curves.
32+
# :py:meth:`pvlib.pvsystem.singlediode` and :py:meth:`pvlib.pvsystem.i_from_v`
33+
# are used to generate the IV curves.
3334

3435
from pvlib import pvsystem
3536
import numpy as np

pvlib/tests/test_pvsystem.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,6 +1426,13 @@ def test_singlediode_series_ivcurve(cec_module_params):
14261426
assert_allclose(v, expected[k], atol=1e-6)
14271427

14281428

1429+
@pytest.mark.parametrize('method', ['lambertw', 'brentq', 'newton'])
1430+
def test_singlediode_ivcurvepnts_deprecation_warning(method):
1431+
with pytest.warns(pvlibDeprecationWarning):
1432+
pvsystem.singlediode(7., 6e-7, .1, 20., .5, ivcurve_pnts=3,
1433+
method=method)
1434+
1435+
14291436
def test_scale_voltage_current_power():
14301437
data = pd.DataFrame(
14311438
np.array([[2, 1.5, 10, 8, 12, 0.5, 1.5]]),

0 commit comments

Comments
 (0)