tox.ini
author Laurent Wouters <lwouters@cenotelie.fr>
Tue, 24 Apr 2018 10:19:42 +0200
changeset 12297 38058ce2a9ec
parent 12248 6350e0a482d5
child 12354 addfdabaa35f
child 12355 c703dc95c82e
permissions -rw-r--r--
[server] Fixed issue with the adapters cache of a cloned EditedEntity The adapters' cache of the entity within an EditedEntity used to be copied along the entity itself during a cloning operation of the EditedEntity. This raises an issue when the adapters' cache is not empty and contains cached values linking to transaction-specific data (or the transaction itself). This prevents the clone EditedEntity being used in a transaction outside the one that created it. This change resets the adapters' cache of the new copy so that no cached value remain. The new copy can then be used in a new transaction afterwards.

[tox]
envlist =
  check-manifest,flake8,
  py{27,3}-{server,web,misc}

[testenv]
deps =
  -r{toxinidir}/requirements/dev.txt
  py27: backports.tempfile
  misc: -r{toxinidir}/requirements/test-misc.txt
  server: -r{toxinidir}/requirements/test-server.txt
  web: -r{toxinidir}/requirements/test-web.txt
commands =
  misc: {envpython} -m pip install --upgrade --no-deps --quiet git+git://github.com/logilab/yapps@master#egg=yapps
  misc: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test
  py27-misc: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/etwist/test
  server: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/server/test
  web: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test

[testenv:flake8]
skip_install = true
deps =
  flake8 >= 3.5
whitelist_externals =
  /bin/sh
commands = /bin/sh -c "flake8 `xargs -a {toxinidir}/flake8-ok-files.txt`"

[testenv:doc]
skip_install = true
changedir = doc
deps =
  sphinx
  -r{toxinidir}/requirements/doc.txt
commands =
  {envpython} -m sphinx -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html

[testenv:check-manifest]
skip_install = true
deps =
  check-manifest
commands =
  {envpython} -m check_manifest {toxinidir} \
# ignore symlinks that are not recognized by check-manifest, see
# https://github.com/mgedmin/check-manifest/issues/69
    --ignore cubicweb/devtools/test/data/cubes/i18ntestcube*,cubicweb/test/data/legacy_cubes*

[pytest]
python_files = *test_*.py
log_print = false

[flake8]
format = pylint
ignore = W503
max-line-length = 100
exclude = doc/*,.tox/*


# vim: wrap sts=2 sw=2