def test_free_terms_are_not_captured():
    from xotl.ql.expressions import any_
    with bubbling() as current:
        next(parent
             for parent in this('parent')
             if parent.name
             if any_(this.children, this.age < 6))
        parts = current.bubble.parts

    assert len(parts) == 2

    pname = this('parent').name
    expected = any_(this.children, this.age < 6)
    with context(UNPROXIFING_CONTEXT):
        assert pname in parts
        assert expected in parts
 def test_undetected_particles(self):
     from xotl.ql.expressions import any_
     next(parent
           for parent in this('parent')
           if any_(child for child in parent.children if child.age < 6))
     parts = self.bubble.parts
     self.assertIs(0, len(parts))
Exemple #3
0
    def test_free_terms_are_not_captured(self):
        from xotl.ql.expressions import any_
        these(parent for parent in this('parent') if parent.name
              if any_(this.children, this.age < 6))

        parts = self.bubble.parts
        self.assertIs(0, len(parts))
    def test_free_terms_are_not_captured(self):
        from xotl.ql.expressions import any_
        these(parent
              for parent in this('parent')
              if parent.name
              if any_(this.children, this.age < 6))

        parts = self.bubble.parts
        self.assertIs(0, len(parts))
def test_undetected_particles():
    from xotl.ql.expressions import any_
    with bubbling() as current:
        next(parent
             for parent in this('parent')
             if any_(child for child in parent.children if child.age < 6))
        parts = current.bubble.parts

    # `child.age < 6` should not be leaked
    assert 1 == len(parts)
Exemple #6
0
    def test_free_terms_are_not_captured(self):
        from xotl.ql.expressions import any_
        next(parent for parent in this('parent') if parent.name
             if any_(this.children, this.age < 6))

        parts = self.bubble.parts
        self.assertIs(1, len(parts))
        pname = this('parent').name
        with context(UNPROXIFING_CONTEXT):
            self.assertIn(pname, parts)
    def test_free_terms_are_not_captured(self):
        from xotl.ql.expressions import any_
        next(parent
              for parent in this('parent')
              if parent.name
              if any_(this.children, this.age < 6))

        parts = self.bubble.parts
        self.assertIs(1, len(parts))
        pname = this('parent').name
        with context(UNPROXIFING_CONTEXT):
            self.assertIn(pname, parts)
Exemple #8
0
 def test_undetected_particles(self):
     from xotl.ql.expressions import any_
     next(parent for parent in this('parent')
          if any_(child for child in parent.children if child.age < 6))
     parts = self.bubble.parts
     self.assertIs(0, len(parts))