Exemple #1
0
    def test_part_without_kind_attribute_will_be_not_in_mapping():
        assert 123 not in PART_MAPPING

        class Part123(Part):
            # No kind attribute
            pass
        assert 123 not in PART_MAPPING
        assert Part123 not in PART_MAPPING.values()
Exemple #2
0
    def test_part_without_kind_attribute_will_be_not_in_mapping(self):
        assert 123 not in PART_MAPPING

        class Part123(Part):
            # No kind attribute
            pass
        assert 123 not in PART_MAPPING
        assert Part123 not in PART_MAPPING.values()
Exemple #3
0
    def test_part_kind_out_of_range_raises_exception():

        with pytest.raises(InterfaceError):
            class OutOfRangePart(Part):
                kind = 255
            assert OutOfRangePart not in PART_MAPPING.values()
Exemple #4
0
    def test_part_kind_out_of_range_raises_exception(self):

        with pytest.raises(InterfaceError):
            class OutOfRangePart(Part):
                kind = 255
            assert OutOfRangePart not in PART_MAPPING.values()