mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-06-22 07:01:30 +00:00
Skip codestyle in stable
Testing this is sid is sufficient and avoids annoying cases where pycodestyle might work differently in stable vs. sid. Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
bb85373210
commit
22610d86a0
@ -12,8 +12,15 @@ git clone https://salsa.debian.org/debian/britney2-tests.git britney2-tests
|
|||||||
if [ "x$1" = "x--with-coverage" ]; then
|
if [ "x$1" = "x--with-coverage" ]; then
|
||||||
PYTEST_COV_OPTIONS="--cov-branch --cov --cov-report="
|
PYTEST_COV_OPTIONS="--cov-branch --cov --cov-report="
|
||||||
BRITNEY=./ci/britney-coverage.sh
|
BRITNEY=./ci/britney-coverage.sh
|
||||||
|
TEST_FLAGS=
|
||||||
|
else
|
||||||
|
TEST_FLAGS=nocodestyle
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export TEST_FLAGS
|
||||||
|
|
||||||
py.test-3 -v $PYTEST_COV_OPTIONS || err=$?
|
py.test-3 -v $PYTEST_COV_OPTIONS || err=$?
|
||||||
|
|
||||||
echo
|
echo
|
||||||
britney2-tests/bin/runtests "$BRITNEY" britney2-tests/t test-out || err=$?
|
britney2-tests/bin/runtests "$BRITNEY" britney2-tests/t test-out || err=$?
|
||||||
|
|
||||||
|
@ -3,6 +3,12 @@ import unittest
|
|||||||
import pycodestyle
|
import pycodestyle
|
||||||
|
|
||||||
|
|
||||||
|
def should_skip_codestyle():
|
||||||
|
if 'nocodestyle' in os.environ.get('TEST_FLAGS', ''):
|
||||||
|
return True
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
EXCEPTIONS_BY_FILE = {
|
EXCEPTIONS_BY_FILE = {
|
||||||
'britney.py': 36,
|
'britney.py': 36,
|
||||||
'britney2/__init__.py': 2,
|
'britney2/__init__.py': 2,
|
||||||
@ -47,6 +53,7 @@ def all_python_files(project_dir):
|
|||||||
|
|
||||||
class TestCodeFormat(unittest.TestCase):
|
class TestCodeFormat(unittest.TestCase):
|
||||||
|
|
||||||
|
@unittest.skipIf(should_skip_codestyle(), 'codestyle conformance skipped as requested')
|
||||||
def test_conformance(self):
|
def test_conformance(self):
|
||||||
"""Test that we conform to PEP-8."""
|
"""Test that we conform to PEP-8."""
|
||||||
project_dir = os.path.dirname(os.path.dirname(__file__))
|
project_dir = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user