diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..42383b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +/.stestr +/.tox +/AUTHORS +/ChangeLog +/*.egg-info diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..4e02594 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./git_nit/tests +top_dir=./ diff --git a/git_nit/cmd.py b/git_nit/cmd.py index c6bd7ab..44a2d8f 100644 --- a/git_nit/cmd.py +++ b/git_nit/cmd.py @@ -8,9 +8,7 @@ # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. -# +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. diff --git a/git_nit/tests/__init__.py b/git_nit/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test-requirements.txt b/test-requirements.txt index 867c229..5976a1c 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,8 @@ hacking>=0.10.0,<0.11 mock fixtures>=0.3.14 -testrepository>=0.0.18 testtools>=0.9.34 sphinx>=1.1.2,!=1.2.0 +coverage +python-subunit>=1.0.0 # Apache-2.0/BSD +stestr>=1.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index f915923..609946e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py27,py35,pep8 +envlist = py35,py27,pep8 [testenv] basepython = python3 @@ -7,9 +7,11 @@ install_command = pip install -U {opts} {packages} setenv = VIRTUAL_ENV={envdir} -commands = - python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}' - coverage report --show-missing +commands = stestr run {posargs} + stestr slowest +# commands = +# python setup.py test --coverage --coverage-package-name=git_nit --slowest --testr-args='{posargs}' +# coverage report --show-missing deps = -r{toxinidir}/requirements.txt @@ -20,9 +22,17 @@ basepython = python2.7 [testenv:pep8] commands = flake8 +skip_install = True -[testenv:sdist] -commands = python setup.py sdist {posargs} +[testenv:cover] +setenv = + {[testenv]setenv} + PYTHON=coverage run --source shade --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] commands = python setup.py build_sphinx