diff --git a/tests/.copyright.tmpl b/tests/.copyright.tmpl index 1eb2340..ecbed6c 100644 --- a/tests/.copyright.tmpl +++ b/tests/.copyright.tmpl @@ -1,2 +1 @@ Copyright ${years} ${owner}. -See LICENSE file for licensing details diff --git a/tests/integration/test_contour.py b/tests/integration/test_contour.py index 0f5e71d..807a088 100644 --- a/tests/integration/test_contour.py +++ b/tests/integration/test_contour.py @@ -1,6 +1,5 @@ # # Copyright 2024 Canonical, Ltd. -# See LICENSE file for licensing details # import json import logging diff --git a/tests/sanity/test_rock.py b/tests/sanity/test_rock.py index fd3ba17..b73e8ac 100644 --- a/tests/sanity/test_rock.py +++ b/tests/sanity/test_rock.py @@ -1,6 +1,5 @@ # # Copyright 2024 Canonical, Ltd. -# See LICENSE file for licensing details # import os import subprocess diff --git a/tests/tox.ini b/tests/tox.ini index a038b15..0c820eb 100644 --- a/tests/tox.ini +++ b/tests/tox.ini @@ -15,22 +15,24 @@ pass_env = description = Apply coding style standards to code deps = -r {tox_root}/requirements-dev.txt commands = - licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root} - isort {tox_root} --profile=black - black {tox_root} + licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/sanity + licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/integration + isort {tox_root}/sanity {tox_root}/integration --profile=black + black {tox_root}/sanity {tox_root}/integration [testenv:lint] description = Check code against coding style standards deps = -r {tox_root}/requirements-dev.txt commands = - codespell {tox_root} --skip=".tox" - flake8 {tox_root} - licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root} --dry - isort {tox_root} --profile=black --check - black {tox_root} --check --diff + codespell {tox_root}/sanity {tox_root}/integration + flake8 {tox_root}/sanity {tox_root}/integration + licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/sanity --dry + licenseheaders -t {tox_root}/.copyright.tmpl -cy -o 'Canonical, Ltd' -d {tox_root}/integration --dry + isort {tox_root}/sanity {tox_root}/integration --profile=black --check + black {tox_root}/sanity {tox_root}/integration --check --diff [testenv:sanity] -description = Run integration tests +description = Run sanity tests deps = -r {tox_root}/requirements-test.txt commands = @@ -61,10 +63,11 @@ pass_env = TEST_* ROCK_* - [flake8] max-line-length = 120 select = E,W,F,C,N -ignore = W503 +# E231: missing whitespace after ':' +# E231 excluded for false positives in strings and fstrings. +ignore = W503,E231 exclude = venv,.git,.tox,.tox_env,.venv,build,dist,*.egg_info show-source = true