Merge pull request #2595 from jreidinger/pytest
use pytest instead of nosetests
This commit is contained in:
commit
677b31630a
9
dist/ci/docker-compose-test.sh
vendored
9
dist/ci/docker-compose-test.sh
vendored
@ -15,10 +15,13 @@ done
|
|||||||
cd /code
|
cd /code
|
||||||
for file in tests/*_tests.py; do
|
for file in tests/*_tests.py; do
|
||||||
if ! test -f /code/.without-coverage; then
|
if ! test -f /code/.without-coverage; then
|
||||||
COVER_ARGS="--with-coverage --cover-xml --cover-package=. --cover-inclusive"
|
COVER_ARGS="--cov=. --cov-append --cov-report=xml"
|
||||||
|
else
|
||||||
|
COVER_ARGS="--no-cov"
|
||||||
fi
|
fi
|
||||||
echo "running tests from $file..."
|
# TODO: Review bot test failed without log-level set to debug
|
||||||
run_as_tester nosetests $COVER_ARGS -c .noserc -s $file
|
# TODO: due to memoize tests cannot be run together, otherwise it start failing
|
||||||
|
run_as_tester pytest $COVER_ARGS --log-level=DEBUG $file
|
||||||
done
|
done
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
|
4
dist/ci/testenv-tumbleweed/Dockerfile
vendored
4
dist/ci/testenv-tumbleweed/Dockerfile
vendored
@ -5,9 +5,9 @@ FROM opensuse/tumbleweed
|
|||||||
RUN zypper -n ar http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Factory/ openSUSE:Tools
|
RUN zypper -n ar http://download.opensuse.org/repositories/openSUSE:/Tools/openSUSE_Factory/ openSUSE:Tools
|
||||||
RUN zypper --gpg-auto-import-keys ref
|
RUN zypper --gpg-auto-import-keys ref
|
||||||
|
|
||||||
RUN zypper in -y osc python3-pytest python3-nose python3-httpretty python3-pyxdg python3-PyYAML \
|
RUN zypper in -y osc python3-pytest python3-httpretty python3-pyxdg python3-PyYAML \
|
||||||
python3-pika python3-mock python3-cmdln python3-lxml python3-python-dateutil python3-colorama \
|
python3-pika python3-mock python3-cmdln python3-lxml python3-python-dateutil python3-colorama \
|
||||||
python3-influxdb python3-coverage python3-pytest-cov python3-coveralls libxml2-tools curl python3-flake8 \
|
python3-influxdb python3-pytest-cov python3-coveralls libxml2-tools curl python3-flake8 \
|
||||||
shadow vim vim-data strace git sudo patch openSUSE-release openSUSE-release-ftp \
|
shadow vim vim-data strace git sudo patch openSUSE-release openSUSE-release-ftp \
|
||||||
perl-Net-SSLeay perl-Text-Diff perl-XML-Simple perl-XML-Parser build \
|
perl-Net-SSLeay perl-Text-Diff perl-XML-Simple perl-XML-Parser build \
|
||||||
obs-service-download_files
|
obs-service-download_files
|
||||||
|
@ -21,7 +21,7 @@ from check_tags_in_requests import TagChecker
|
|||||||
sys.path.append(".")
|
sys.path.append(".")
|
||||||
|
|
||||||
APIURL = 'http://maintenancetest.example.com'
|
APIURL = 'http://maintenancetest.example.com'
|
||||||
FIXTURES = os.path.join(os.getcwd(), 'tests/fixtures')
|
FIXTURES = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures')
|
||||||
|
|
||||||
|
|
||||||
class TestTagChecker(unittest.TestCase):
|
class TestTagChecker(unittest.TestCase):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user