Build failed in Jenkins: cubicweb-compound » py27,debian_jessie #10

jenkins.logilab.org noreply at logilab.org
Fri Mar 3 10:50:23 CET 2017


https://jenkins.logilab.org/job/cubicweb-compound/TOXENV=py27,distributions=debian_jessie/10/Changes:

[Sylvain Thénault <sylvain.thenault at logilab.fr>] Fix case where IClonable.skiprtypes include direct relation of the container

those are copied using standard Entity.copy_relations method, hence adapter's
skiprtypes should be copied in entity's cw_skip_copy_for to control above
method.

------------------------------------------
[...truncated 8.00 KB...]
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
----------------------------- Captured stderr call -----------------------------
<https://jenkins.logilab.org/job/cubicweb-compound/TOXENV=py27,distributions=debian_jessie/ws/.tox/py27/local/lib/python2.7/site-packages/cubicweb/devtools/testlib.py>:728: DeprecationWarning: [3.24] path argument got removed from app_handle_request parameters, give it to the request constructor
  'give it to the request constructor', DeprecationWarning)
_____________________ CloneTC.test_clone_follow_relations ______________________

self = <test_compound.CloneTC testMethod=test_clone_follow_relations>

    def test_clone_follow_relations(self):
        with self.admin_access.repo_cnx() as cnx:
            bob = cnx.create_entity('Agent', name=u'bob')
            group = cnx.create_entity('Group', member=bob)
            cnx.create_entity('OnlineAccount', reverse_account=bob)
            cnx.commit()
        with self.new_access(u'georges').repo_cnx() as cnx:
>           clone = clone_agent(cnx, u'bob')

test/test_compound.py:341: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/test_compound.py:271: in clone_agent
    adapted.clone_into(clone)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <entities.AgentInGroupIClonableAdapter object at 0x7ffac5b860d0>
clone = <Entity Agent 899 [u'name'] at 140715036646096>

    def clone_into(self, clone):
        """Recursivily clone the container graph of this entity into `clone`.
    
            Return a dictionary mapping original entities to their clone.
            """
        assert clone.cw_etype == self.entity.cw_etype, \
            "clone entity type {} does not match with original's {}".format(
                clone.cw_etype, self.entity.cw_etype)
        related = self.graph.child_related(
            self.entity, follow_relations=self.follow_relations)
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
___________________________ CloneTC.test_clone_full ____________________________

self = <test_compound.CloneTC testMethod=test_clone_full>

    def test_clone_full(self):
        with self.admin_access.repo_cnx() as cnx:
            agent = cnx.create_entity('Agent', name=u'bob')
            cnx.create_entity('OnlineAccount', reverse_account=agent)
            bio = cnx.create_entity('Biography', reverse_biography=agent)
            cnx.create_entity('Event', reverse_event=bio)
            cnx.create_entity('Anecdote', reverse_event=bio)
            cnx.create_entity('Anecdote', reverse_event=bio, narrated_by=agent)
            cnx.commit()
        with self.new_access(u'georges').repo_cnx() as cnx:
            bob = cnx.find('Agent', name=u'bob').one()
            clone = cnx.create_entity('Agent', name=u'bobby')
>           bob.cw_adapt_to('IClonable').clone_into(clone)

test/test_compound.py:372: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <entities.AgentIClonableAdapter object at 0x7ffac877a250>
clone = <Entity Agent 902 [u'name'] at 140715081836944>

    def clone_into(self, clone):
        """Recursivily clone the container graph of this entity into `clone`.
    
            Return a dictionary mapping original entities to their clone.
            """
        assert clone.cw_etype == self.entity.cw_etype, \
            "clone entity type {} does not match with original's {}".format(
                clone.cw_etype, self.entity.cw_etype)
        related = self.graph.child_related(
            self.entity, follow_relations=self.follow_relations)
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
___________________________ CloneTC.test_clone_hook ____________________________

self = <test_compound.CloneTC testMethod=test_clone_hook>

    def test_clone_hook(self):
        with self.admin_access.repo_cnx() as cnx:
            self._clone_setup(cnx)
            cnx.commit()
        with self.new_access(u'georges').repo_cnx() as cnx:
            bob = cnx.find('Agent', name=u'bob').one()
>           clone = cnx.create_entity('Agent', name=u'bobby', clone_of=bob)

test/test_compound.py:407: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py27/local/lib/python2.7/site-packages/cubicweb/req.py:183: in create_entity
    return cls.cw_instantiate(self.execute, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/entity.py:524: in cw_instantiate
    created = execute(rql, qargs).get_entity(0, 0)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:190: in check_open
    return func(cnx, *args, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/session.py:806: in execute
    rset = self._execute(self, rql, kwargs, build_descr)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/sqlutils.py:477: in new_execute
    rset = base_execute(*args, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/statsd_logger.py:121: in __call__
    return self.callable(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/querier.py:606: in execute
    results = plan.execute()
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/querier.py:187: in execute
    result = step.execute()
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/ssplanner.py:436: in execute
    result = self.plan.insert_entity_defs()
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/querier.py:433: in insert_entity_defs
    for edef in row])
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/repository.py:850: in glob_add_entity
    eidfrom=entity.eid, rtype=attr, eidto=value)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/hook.py:416: in call_hooks
    registry.call_hooks(event, cnx, **kwargs)
.tox/py27/local/lib/python2.7/site-packages/cubicweb/server/hook.py:337: in call_hooks
    hook()
.tox/py27/share/cubicweb/cubes/compound/hooks.py:52: in __call__
    adapted.clone_into(clone)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <entities.AgentIClonableAdapter object at 0x7ffac5f73190>
clone = <Entity Agent 902 ['modification_date', u'clone_of', u'name', 'cwuri', 'creation_date'] at 140715081473744>

    def clone_into(self, clone):
        """Recursivily clone the container graph of this entity into `clone`.
    
            Return a dictionary mapping original entities to their clone.
            """
        assert clone.cw_etype == self.entity.cw_etype, \
            "clone entity type {} does not match with original's {}".format(
                clone.cw_etype, self.entity.cw_etype)
        related = self.graph.child_related(
            self.entity, follow_relations=self.follow_relations)
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
__________________________ CloneTC.test_clone_simple ___________________________

self = <test_compound.CloneTC testMethod=test_clone_simple>

    def test_clone_simple(self):
        with self.admin_access.repo_cnx() as cnx:
            bob = cnx.create_entity('Agent', name=u'bob')
            alice_eid = cnx.create_entity(
                'Agent', name=u'alice', knows=bob).eid
            cnx.create_entity('OnlineAccount', reverse_account=bob)
            cnx.commit()
        with self.new_access(u'georges').repo_cnx() as cnx:
            bob = cnx.find('Agent', name=u'bob').one()
            clone = cnx.create_entity('Agent', name=u'bobby')
>           cloned = bob.cw_adapt_to('IClonable').clone_into(clone)

test/test_compound.py:318: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <entities.AgentIClonableAdapter object at 0x7ffac86e3290>
clone = <Entity Agent 899 [u'name'] at 140715077941840>

    def clone_into(self, clone):
        """Recursivily clone the container graph of this entity into `clone`.
    
            Return a dictionary mapping original entities to their clone.
            """
        assert clone.cw_etype == self.entity.cw_etype, \
            "clone entity type {} does not match with original's {}".format(
                clone.cw_etype, self.entity.cw_etype)
        related = self.graph.child_related(
            self.entity, follow_relations=self.follow_relations)
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
________________________ CloneTC.test_clone_skiprtypes _________________________

self = <test_compound.CloneTC testMethod=test_clone_skiprtypes>

    def test_clone_skiprtypes(self):
        with self.admin_access.repo_cnx() as cnx:
            bob = cnx.create_entity('Agent', name=u'bob')
            cnx.create_entity('Group', member=bob)
            cnx.commit()
    
            orig_cw_skip_copy_for = bob.cw_skip_copy_for
>           clone = clone_agent(cnx, u'bob', skiprtypes=('member',))

test/test_compound.py:356: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
test/test_compound.py:271: in clone_agent
    adapted.clone_into(clone)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <entities.AgentInGroupIClonableAdapter object at 0x7ffac89b0850>
clone = <Entity Agent 898 [u'name'] at 140715074311760>

    def clone_into(self, clone):
        """Recursivily clone the container graph of this entity into `clone`.
    
            Return a dictionary mapping original entities to their clone.
            """
        assert clone.cw_etype == self.entity.cw_etype, \
            "clone entity type {} does not match with original's {}".format(
                clone.cw_etype, self.entity.cw_etype)
        related = self.graph.child_related(
            self.entity, follow_relations=self.follow_relations)
        # take care not modifying clone.cw_skip_copy_for class attribute to avoid undesired side
        # effects (e.g. clone called with different skiprtypes value), set an instance attribute.
        clone.cw_skip_copy_for = list(chain(
            clone.cw_skip_copy_for,
            ((rtype, 'subject') for rtype in self.skiprtypes)
>           ((rtype, 'object') for rtype in self.skiprtypes)))
E       TypeError: 'generator' object is not callable

.tox/py27/share/cubicweb/cubes/compound/entities.py:213: TypeError
===================== 6 failed, 21 passed in 24.34 seconds =====================
ERROR: InvocationError: '<https://jenkins.logilab.org/job/cubicweb-compound/TOXENV=py27,distributions=debian_jessie/ws/.tox/py27/bin/python> -m pytest <https://jenkins.logilab.org/job/cubicweb-compound/TOXENV=py27,distributions=debian_jessie/ws/test'>
___________________________________ summary ____________________________________
ERROR:   py27: commands failed
Build step 'Execute shell' marked build as failure



More information about the saem-devel mailing list