Conditions | 1 |
Total Lines | 16 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import numpy as np |
||
13 | @classmethod |
||
14 | def setUpClass(cls): |
||
15 | cls.data_corr_df = pd.DataFrame([[1, 0, 3, 4], |
||
16 | [3, 4, 5, 6], |
||
17 | ['a', 'b', pd.NA, 'd'], |
||
18 | [5, False, np.nan, pd.NaT]], |
||
19 | columns=['Col1', 'Col2', 'Col3', 'Col4']) |
||
20 | |||
21 | cls.data_corr_list = [1, 2, -3, 4, 5, 0] |
||
22 | |||
23 | def test_output_type(self): |
||
24 | # Test conversion from pd.io.formats.style.Styler to pd.core.frame.DataFrame |
||
25 | self.assertTrue(type(corr_mat(self.data_corr_df)), type(pd.DataFrame)) |
||
26 | self.assertTrue(type(corr_mat(self.data_corr_list)), type(pd.DataFrame)) |
||
27 | |||
28 | def test_output_shape(self): |
||
29 | # Test for output of equal dimensions |
||
32 |