def test_compare_options_different_categories(self): """Test that a regression sections having different data categories causes a failure. """ conf = {} comparison = Comparison('unittest', conf) section = 'foo_test' a_data = { 'category': comparison._tolerances.GENERAL, 'min': '1.02345e-1', } a_name = 'a_baseline' b_data = { 'category': comparison._tolerances.CONC, 'min': '1.02345e-1', } b_name = 'b_regression' comparison._compare_options(section, a_data, a_name, b_data, b_name) self.assertEqual(comparison._status, 'fail')
def test_compare_options_missing_key_second_fails(self): """Test that a key missing from the second regression section causes a failure. """ conf = {} comparison = Comparison('unittest', conf) section = 'foo_test' a_data = { 'category': comparison._tolerances.CONC, 'min': '1.02345e-1', } a_name = 'a_baseline' b_data = { 'category': comparison._tolerances.CONC, 'min': '1.02345e-1', 'max': '9.8765e1', } b_name = 'b_regression' comparison._compare_options(section, a_data, a_name, b_data, b_name) self.assertEqual(comparison._status, 'fail')