@@ -108,6 +108,7 @@ def test_pvfactors_timeseries_pandas_inputs(run_parallel_calculations):
108
108
pd .testing .assert_series_equal (ipoa_front , expected_ipoa_front )
109
109
pd .testing .assert_series_equal (ipoa_back , expected_ipoa_back )
110
110
111
+
111
112
def test_build_1 ():
112
113
"""Test that build correctly instantiates a dictionary, when passed a Nones
113
114
for the report and pvarray arguments.
@@ -117,23 +118,26 @@ def test_build_1():
117
118
expected = {'total_inc_back' : [], 'total_inc_front' : []}
118
119
assert expected == build (report , pvarray )
119
120
121
+
120
122
def test_merge_1 ():
121
123
"""Test that merge correctly returns the first element of the reports
122
124
argument when there is only dictionary in reports.
123
125
"""
124
- test_dict = {'total_inc_back' : [1 ,2 , 3 ], 'total_inc_front' : [4 ,5 , 6 ]}
126
+ test_dict = {'total_inc_back' : [1 , 2 , 3 ], 'total_inc_front' : [4 , 5 , 6 ]}
125
127
reports = [test_dict ]
126
128
assert test_dict == merge (reports )
127
129
130
+
128
131
def test_merge_2 ():
129
132
"""Test that merge correctly combines two dictionary reports.
130
133
"""
131
- test_dict_1 = {'total_inc_back' : [1 ,2 ], 'total_inc_front' : [4 ,5 ]}
134
+ test_dict_1 = {'total_inc_back' : [1 , 2 ], 'total_inc_front' : [4 , 5 ]}
132
135
test_dict_2 = {'total_inc_back' : [3 ], 'total_inc_front' : [6 ]}
133
- expected = {'total_inc_back' : [1 ,2 , 3 ], 'total_inc_front' : [4 ,5 , 6 ]}
136
+ expected = {'total_inc_back' : [1 , 2 , 3 ], 'total_inc_front' : [4 , 5 , 6 ]}
134
137
reports = [test_dict_1 , test_dict_2 ]
135
138
assert expected == merge (reports )
136
139
140
+
137
141
def test_merge_3 ():
138
142
"""Test that merge correctly combines three dictionary reports.
139
143
"""
0 commit comments