Skip to content

Commit

Permalink
Add back dtype assignemnts
Browse files Browse the repository at this point in the history
And hope that Windows OS is happy with them.
  • Loading branch information
ioannis-vm committed May 18, 2024
1 parent 29461bc commit 8bab912
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion pelicun/tests/model/test_damage_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,8 @@ def test__generate_dmg_sample(self, assessment_instance):
pd.DataFrame(
{
('cmp.test', '1', '2', '3', '1', '1'): [1, 1],
}
},
dtype='int64',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid', 'block', 'ls']),
)

Expand Down Expand Up @@ -620,6 +621,7 @@ def test__prepare_dmg_quantities(self, assessment_instance):
('A', '0', '1', '0', '1'): [-1, 0, 1, 2, 3], # block 1
('A', '0', '1', '0', '2'): [3, -1, 0, 1, 2], # block 2
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid', 'block'])

component_sample = pd.DataFrame(
Expand Down Expand Up @@ -666,6 +668,7 @@ def test__prepare_dmg_quantities(self, assessment_instance):
{
('A', '0', '1', '0', '1'): [-1, 0, 1, 2, 3],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid', 'block'])

component_sample = pd.DataFrame(
Expand Down Expand Up @@ -705,6 +708,7 @@ def test__prepare_dmg_quantities(self, assessment_instance):
('A', '0', '1', '0', '1'): [-1, 0],
('A', '0', '1', '1', '1'): [1, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid', 'block'])

component_sample = pd.DataFrame(
Expand Down Expand Up @@ -761,6 +765,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.B": {"DS1": "CMP.A_DS4"}}
Expand All @@ -776,6 +781,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -790,6 +796,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.B": {"DS1": "CMP.A_NA"}}
Expand All @@ -805,6 +812,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -821,6 +829,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '2', '1', '0'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.B-LOC": {"DS1": "CMP.A_DS4"}}
Expand All @@ -836,6 +845,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '2', '1', '0'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -853,6 +863,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.C', '1', '1', '0'): [0, 0, 0],
('CMP.D', '1', '1', '0'): [0, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.A": {"DS1": "ALL_DS2"}}
Expand All @@ -868,6 +879,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.C', '1', '1', '0'): [2, 0, 0],
('CMP.D', '1', '1', '0'): [2, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -884,6 +896,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.B": {"DS1": "CMP.A_NA"}}
Expand All @@ -899,6 +912,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '1', '1', '1'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -913,6 +927,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '2', '1', '0'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.B-LOC": {"DS1": "CMP.A_NA"}}
Expand All @@ -928,6 +943,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.B', '1', '1', '0'): [0, 0, 1],
('CMP.B', '2', '1', '0'): [1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -944,6 +960,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.C', '1', '1', '0'): [0, 0, 0],
('CMP.C', '2', '1', '0'): [0, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.A-LOC": {"DS1": "ALL_NA"}}
Expand All @@ -961,6 +978,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.C', '1', '1', '0'): [0, 0, -1],
('CMP.C', '2', '1', '0'): [-1, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid']),
)

Expand All @@ -972,6 +990,7 @@ def test__perform_dmg_task(self, assessment_instance):
('CMP.A', '1', '1', '0'): [0, 0, 0],
('CMP.B', '1', '1', '1'): [0, 0, 0],
},
dtype='int32',
).rename_axis(columns=['cmp', 'loc', 'dir', 'uid'])

dmg_process = {"1_CMP.C": {"DS1": "CMP.A_DS4"}}
Expand Down

0 comments on commit 8bab912

Please sign in to comment.