Revision 873cdacfaf2bd4127f6378358504feefb3a47fd4 authored by Nicolas Dandrimont on 10 June 2020, 09:28:19 UTC, committed by Nicolas Dandrimont on 10 June 2020, 09:28:19 UTC
When running the cli with default settings (i.e. pointing to a
softwareheritage-scheduler-dev database), and the database doesn't exist, an
OperationalError is raised.

This shouldn't prevent (some of the) cli subcommands from working, so catch this
error and ignore it as one of the scheduler backend setup failure modes.
1 parent 28c5b8d
Raw File
tox.ini
[tox]
envlist=black,flake8,mypy,py3

[testenv]
extras =
  testing
deps =
  pytest-cov
  dev: ipdb
setenv =
  LC_ALL=C.UTF-8
  LC_CTYPE=C.UTF-8
  LANG=C.UTF-8
commands =
      pytest --doctest-modules \
  !slow: --hypothesis-profile=fast \
  slow:  --hypothesis-profile=slow \
         --cov={envsitepackagesdir}/swh/scheduler \
         {envsitepackagesdir}/swh/scheduler \
         --cov-branch {posargs}

[testenv:black]
skip_install = true
deps =
  black
commands =
  {envpython} -m black --check swh

[testenv:flake8]
skip_install = true
deps =
  flake8
commands =
  {envpython} -m flake8

[testenv:mypy]
extras =
  testing
deps =
  mypy
commands =
  mypy swh
back to top