Пример #1
0
 def test_can_calculate_when_called_with_all_values_populated_but_X_is_an_n_element_numpy_aray_returns_true(
         self):
     assert MetricsCalculation.can_calculate({'X': np.array([1, 2, 3, 4])},
                                             {
                                                 'c': 0,
                                                 'm': 0
                                             })
Пример #2
0
 def test_can_calculate_when_called_with_c_parameter_returns_false(self):
     assert not MetricsCalculation.can_calculate({}, {'c': 0})
Пример #3
0
 def test_can_calculate_when_called_with_X_channel_returns_false(self):
     assert not MetricsCalculation.can_calculate({'X': 0}, {})
Пример #4
0
 def test_can_calculate_when_called_with_m_parameter_None_returns_false(
         self):
     assert not MetricsCalculation.can_calculate({}, {'m': None})
Пример #5
0
 def test_can_calculate_when_called_with_all_values_populated_but_X_is_an_empty_numpy_aray_returns_false(
         self):
     assert not MetricsCalculation.can_calculate({'X': np.array([])}, {
         'c': 0,
         'm': 0
     })
Пример #6
0
 def test_can_calculate_when_called_with_all_values_populated_as_None_returns_false(
         self):
     assert not MetricsCalculation.can_calculate({'X': None}, {
         'c': None,
         'm': None
     })