cubicweb/skeleton/tox.ini.tmpl
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Fri, 28 Apr 2017 09:49:37 +0200
changeset 12183 af5d0a3c3f1a
parent 12099 5dd20fc21557
child 12341 921dfb88b115
permissions -rw-r--r--
[req] fix find() generating non-rewritable rql on non final relations When filtering on a relation, find() was generating rql like 'Any X WHERE X is ETYPE, X relation EID' which work without being rewritten (it should probably not), but when applying some rewrite (eg. permissions) it raise in rqlrewrite code. def _use_orig_term(self, snippet_varname, term): ... > self.rewritten[key] = term.name E AttributeError: 'Constant' object has no attribute 'name' Generate valid rql instead 'Any X WHERE X is ETYPE, X relation Y, Y eid EID'.

[tox]
envlist = py27,py34,flake8

[testenv]
deps =
  pytest
commands =
  {envpython} -m pytest {posargs:test}

[testenv:flake8]
skip_install = true
whitelist_externals =
  flake8
deps =
  flake8
commands = flake8

[flake8]
exclude = cubicweb_%(cubename)s/migration/*,test/data/*,.tox/*