bbf0ef9da5e116c323dd94452bd909e1e1ef2148,Orange/widgets/tests/test_settings.py,DomainContextSettingsHandlerTests,test_match_if_all_values_match_returns_1,#DomainContextSettingsHandlerTests#,191

Before Change


        self.assertEqual(self.handler.match(mock_context, None, attrs, metas), 0.1)

    def test_match_if_all_values_match_returns_1(self):
        attrs, metas = self.handler.encode_domain(self.domain)
        mock_context = Mock(values={})
        self.add_setting(mock_context, "setting", ContextSetting(""))
        self.add_setting(mock_context, "required_setting",
                         ContextSetting("", required=ContextSetting.REQUIRED))
        mock_context.values["setting"] = ("df1", VarTypes.Discrete)
        mock_context.values["required_setting"] = ("df1", VarTypes.Discrete)

        self.assertEqual(self.handler.match(mock_context, None, attrs, metas), 1.)

    def test_match_if_all_list_values_match_returns_1(self):

After Change


        self.assertEqual(self.match(mock_context), 0.1)

    def test_match_if_all_values_match_returns_1(self):
        mock_context = Mock(values=dict(
            discrete_setting=(DISCRETE_ATTR_ABC, VarTypes.Discrete),
            required_setting=(DISCRETE_ATTR_ABC, VarTypes.Discrete),
        ))

        self.assertEqual(self.match(mock_context), 1.)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: biolab/orange3
Commit Name: bbf0ef9da5e116c323dd94452bd909e1e1ef2148
Time: 2014-02-11
Author: anze.staric@gmail.com
File Name: Orange/widgets/tests/test_settings.py
Class Name: DomainContextSettingsHandlerTests
Method Name: test_match_if_all_values_match_returns_1


Project Name: biolab/orange3
Commit Name: bbf0ef9da5e116c323dd94452bd909e1e1ef2148
Time: 2014-02-11
Author: anze.staric@gmail.com
File Name: Orange/widgets/tests/test_settings.py
Class Name: DomainContextSettingsHandlerTests
Method Name: test_match_if_all_values_match_returns_1


Project Name: biolab/orange3
Commit Name: bbf0ef9da5e116c323dd94452bd909e1e1ef2148
Time: 2014-02-11
Author: anze.staric@gmail.com
File Name: Orange/widgets/tests/test_settings.py
Class Name: DomainContextSettingsHandlerTests
Method Name: test_match_if_all_list_values_match_returns_1


Project Name: biolab/orange3
Commit Name: bbf0ef9da5e116c323dd94452bd909e1e1ef2148
Time: 2014-02-11
Author: anze.staric@gmail.com
File Name: Orange/widgets/tests/test_settings.py
Class Name: DomainContextSettingsHandlerTests
Method Name: test_match_if_all_required_list_values_match_returns_1