@@ -34,25 +34,30 @@ def test_borefield_init(field, request):
3434
3535
3636# Test Borefield.__add__ and Borefield.__radd__
37- @pytest .mark .parametrize ("field, other_field, field_list, other_field_list" , [
38- # Using Borefield and Borehole objects
39- ('single_borehole' , 'two_boreholes_inclined' , False , False ),
40- ('ten_boreholes_rectangular' , 'single_borehole_short' , False , False ),
41- ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , False , False ),
37+ @pytest .mark .parametrize ("field, other_field, field_list, other_field_list, field_borehole, other_field_borehole" , [
38+ # Using Borefield objects
39+ ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , False , False , False , False ),
40+ # Using Borefield objects
41+ ('single_borehole' , 'two_boreholes_inclined' , False , False , True , False ),
42+ ('ten_boreholes_rectangular' , 'single_borehole_short' , False , False , False , True ),
4243 # Using Borefield as lists
43- ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , False , True ),
44- ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , True , False ),
44+ ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , False , True , False , False ),
45+ ('ten_boreholes_rectangular' , 'two_boreholes_inclined' , True , False , False , False ),
4546 ])
46- def test_borefield_add (field , other_field , field_list , other_field_list , request ):
47- field = request .field
48- other_field = request .other_field
47+ def test_borefield_add (field , other_field , field_list , other_field_list , field_borehole , other_field_borehole , request ):
48+ field = request .getfixturevalue ( field )
49+ other_field = request .getfixturevalue ( other_field )
4950 reference_field = gt .borefield .Borefield .from_boreholes (
5051 field .to_boreholes () + other_field .to_boreholes ()
5152 )
5253 if field_list :
5354 field = field .to_boreholes ()
5455 if other_field_list :
5556 other_field = other_field .to_boreholes ()
57+ if field_borehole :
58+ field = field [0 ]
59+ if other_field_borehole :
60+ other_field = other_field [0 ]
5661 assert field + other_field_list == reference_field
5762
5863
0 commit comments