def test_fail_calculator_invalid_type_density(self): with self.assertRaises(TypeError): calculator(self.config.test_available_coefficient, self.empty_dataframe, self.config.test_invalid_density_constant)
def test_pass_calculator(self): self.assertEqual( calculator(self.config.test_available_coefficient, self.empty_dataframe, self.config.test_density_constant).__name__, self.config.test_available_coefficient_function_name)
def test_fail_calculator_unavailable_coefficient(self): with self.assertRaises(KeyError): calculator(self.config.test_unavailable_coefficient, self.empty_dataframe, self.config.test_density_constant)