예제 #1
0
 def test_can_persist_n_channel_full_data_returns_true(self):
     assert MetricsCalculation.can_persist({
         'X':
         np.array([1, 2, 3, 4]),
         'Y':
         np.array([1.0, 2.0, 3.0, 4.0])
     })
예제 #2
0
 def test_can_persist_n_channel_empty_data_returns_true(self):
     assert MetricsCalculation.can_persist({
         'X': np.array([]),
         'Y': np.array([])
     })
예제 #3
0
 def test_can_persist_one_channel_full_data_returns_true(self):
     assert MetricsCalculation.can_persist({'X': np.array([1, 2, 3, 4])})
예제 #4
0
 def test_can_persist_float_type_parameter_returns_true(self):
     assert MetricsCalculation.can_persist({'a': 2.0})
예제 #5
0
 def test_can_persist_incorrect_type_parameter_returns_false(self):
     assert not MetricsCalculation.can_persist({'a': None})
예제 #6
0
 def test_can_persist_incorrect_type_channel_data_returns_false(self):
     assert not MetricsCalculation.can_persist({'X': []})
예제 #7
0
 def test_can_persist_empty_data_returns_false(self):
     assert not MetricsCalculation.can_persist({})