-[Git]
+[all]
+ignore = .tox/**,
+ .git/**,
+ .gitignore,
+ .gitreview,
+ .gitmodules,
+ node_modules/**
+
+[all.Git]
bears = GitCommitBear
ignore_length_regex = Signed-off-by,
Also-by,
http://,
https://
-[Documentation]
+[all.Documentation]
bears = WriteGoodLintBear
files = docs/**/*.rst
-[Python]
+[all.Python]
bears = BanditBear,
PEP8Bear,
PyCommentedCodeBear,
PyDocStyleBear,
PyFlakesBear,
PyImportSortBear
-files = lftools/**/*.py
+files = **.py
+ignore += docs/conf.py
known_first_party_imports = lftools
known_third_party_imports = pytest, six
pydocstyle_ignore = D203, D213, D301
max_line_length = 120
-[Shell]
+[all.Shell]
bears = ShellCheckBear,
SpaceConsistencyBear
-files = shell/*
+files = **.sh, shell/*
shell = bash
indent_size = 4
use_spaces = yeah
+# -*- coding: utf-8 -*-
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2017 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+"""Setup.py."""
+
from setuptools import find_packages
from setuptools import setup
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
+"""Unit tests for the version command."""
-import difflib
-from distutils import dir_util
import filecmp
import os
-import click
import pytest
from lftools import cli
-
FIXTURE_DIR = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
'fixtures',
os.path.join(FIXTURE_DIR, 'version_bump'),
)
def test_version_bump(cli_runner, datafiles):
+ """Test version bump command."""
os.chdir(str(datafiles))
- result = cli_runner.invoke(cli.cli, ['version', 'bump', 'TestRelease'])
+ cli_runner.invoke(cli.cli, ['version', 'bump', 'TestRelease'])
for _file in datafiles.listdir():
pom = str(_file) + '/pom.xml'
expected_pom = str(_file) + '/pom.xml.expected'
+ # noqa: B101 .
assert filecmp.cmp(pom, expected_pom)
os.path.join(FIXTURE_DIR, 'version_release'),
)
def test_version_release(cli_runner, datafiles):
+ """Test version release command."""
os.chdir(str(datafiles))
- result = cli_runner.invoke(cli.cli, ['version', 'release', 'TestRelease'])
+ cli_runner.invoke(cli.cli, ['version', 'release', 'TestRelease'])
for _file in datafiles.listdir():
pom = str(_file) + '/pom.xml'
expected_pom = str(_file) + '/pom.xml.expected'
+ # noqa: B101 .
assert filecmp.cmp(pom, expected_pom)