GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( cc6bfd...4f98db )
by Andreas
01:27
created

Test__missing_vals.setUpClass()   A

Complexity

Conditions 1

Size

Total Lines 16
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 14
nop 1
dl 0
loc 16
rs 9.7
c 0
b 0
f 0
1
import numpy as np
2
import pandas as pd
3
import unittest
4
from klib.describe import corr_mat
5
# from klib.utils import _missing_vals
6
7
if __name__ == '__main__':
8
    unittest.main()
9
10
11
class Test_corr_mat(unittest.TestCase):
12
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
30
        self.assertEqual(corr_mat(self.data_corr_df).data.shape[0], corr_mat(self.data_corr_df).data.shape[1])
31
        self.assertEqual(corr_mat(self.data_corr_list).data.shape[0], corr_mat(self.data_corr_list).data.shape[1])
32