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
def test_walker_create_dummy(session): with pytest.raises(TypeError): walker.create(DummyAttr(), session)