Example #1
0
    def __xor__(self, other):
        if not isinstance(other, self.__class__):
            return NotImplemented

        new = DummyAttr()
        if self.min < other.min:
            new |= self.create(self.min, min(other.min, self.max))
        if other.max < self.max:
            new |= self.create(other.max, self.max)
        return new
Example #2
0
def test_walker_create_dummy(session):
    with pytest.raises(TypeError):
        walker.create(DummyAttr(), session)