test_kyd.test_int_data()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 4
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
from knowyourdata import kyd
2
import numpy as np
3
4
5
def test_struct():
6
    test_array = np.ones(5)
7
    data_summary = kyd(test_array)
8
    assert(data_summary.f_allfinite == True)
9
10
11
def test_int_data():
12
    test_array = np.ones(5, dtype=np.int32)
13
    data_summary = kyd(test_array)
14
    assert(data_summary.dtype.name == 'int32')
15
16
17
def test_all_nan():
18
    test_array = np.ones(5) * np.nan
19
    data_summary = kyd(test_array)