From 51fbaaa9b441e0efb0aad28a32a37a9381312d9c Mon Sep 17 00:00:00 2001 From: Nikolay Kushin Date: Tue, 7 Jul 2020 16:04:25 +0200 Subject: [PATCH] Add test (#346) --- ixmp/tests/core/test_timeseries.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ixmp/tests/core/test_timeseries.py b/ixmp/tests/core/test_timeseries.py index 8522cd7e4..666a0d911 100644 --- a/ixmp/tests/core/test_timeseries.py +++ b/ixmp/tests/core/test_timeseries.py @@ -206,6 +206,13 @@ def test_add_timeseries(ts, fmt): ts.add_timeseries(DATA[0].drop('unit', axis=1)) +@pytest.mark.parametrize('fmt', ['long', 'wide']) +def test_add_timeseries_unit(ts, fmt): + data = DATA[0].copy() if fmt == 'long' else wide(DATA[0]) + data['unit'] = 1 + ts.add_timeseries(data) + + @pytest.mark.parametrize('fmt', ['long', 'wide']) def test_add_and_remove_timeseries_with_long_variable_name(ts, fmt): data = (DATA[0] if fmt == 'long' else wide(DATA[0])).copy()