def test_validate(self): s = Stack() s.push(Slice(1, 2, 3)) s.push(Slice(3, 4, 5)) assert s.isValid()