From 14cb348a09b30c92de89878c58e790779ebdad23 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Wed, 10 Feb 2021 10:50:00 +0000 Subject: [PATCH] Migrate unit tests from testr to stestr Note: there aren't actually any unit tests, but this at least moves it away from the deprecated library. Change-Id: Ic9bec4534bc200d427241cd60b5b90b0fd89102e --- .stestr.conf | 3 +++ test-requirements.txt | 4 ++-- tox.ini | 10 ++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .stestr.conf diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..5fcccac --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./unit_tests +top_dir=./ diff --git a/test-requirements.txt b/test-requirements.txt index 095ec9c..9ea2415 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,2 +1,2 @@ -flake8>=2.2.4,<=2.4.1 -os-testr>=0.4.1 +flake8>=2.2.4 +stestr>=2.2.0 diff --git a/tox.ini b/tox.ini index 52e6ca2..1daf22f 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ setenv = VIRTUAL_ENV={envdir} PYTHONHASHSEED=0 install_command = pip install {opts} {packages} -commands = ostestr {posargs} +commands = stestr run {posargs} [testenv:py34] basepython = python3.4 @@ -25,6 +25,12 @@ deps = -r{toxinidir}/test-requirements.txt # TODO: Need to write unit tests then remove the following command. commands = /bin/true +[testenv:py3] +basepython = python3 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +commands = /bin/true + [testenv:pep8] basepython = python3 deps = -r{toxinidir}/test-requirements.txt @@ -35,4 +41,4 @@ basepython = python3 commands = {posargs} [flake8] -ignore = E402,E226 +ignore = E402,E226,W504,W503