Example #1
0
    def test_should_get_differences_1(self, _p0, cfg):
        # given
        generic_condition = Condition.empty(length=cfg.classifier_length)
        p0 = Perception(_p0)
        mark = PMark(cfg)

        # when
        diff = mark.get_differences(p0)

        # then
        assert diff == generic_condition
Example #2
0
    def test_should_return_number_of_specified_elements(self):
        # given
        condition = Condition.empty(8)
        assert 0 == condition.specificity

        # when
        condition[2] = '1'
        condition[5] = '0'

        # then
        assert condition.specificity == 2