Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to pytest #317

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,6 @@ omit =
cloudbridge/__init__.py
parallel = True

[nosetests]
with-coverage=1
cover-branches=1
cover-package=cloudbridge
processes=5
process-timeout=3000
match=^[Tt]est
verbosity=2
# When exceptions occur, filter only cloudbridge logs
logging-filter=cloudbridge

[bdist_wheel]
universal = 1

Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
# httpretty is required with/for moto 1.0.0 or AWS tests fail
REQS_DEV = ([
'tox>=2.1.1',
'nose',
'pytest',
'moto>=3.1.18',
'sphinx>=1.3.1',
'pydevd',
Expand All @@ -73,7 +73,6 @@
author='Galaxy and GVL Projects',
author_email='help@genome.edu.au',
url='http://cloudbridge.cloudve.org/',
setup_requires=['nose>=1.0'],
install_requires=REQS_BASE,
extras_require={
':python_version<"3.3"': ['ipaddress'],
Expand Down
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
envlist = {py3.10,pypy}-{aws,azure,gcp,openstack,mock},lint

[testenv]
commands = # see setup.cfg for options sent to nosetests and coverage
nosetests -v --nocapture --nologcapture --logging-format='%(asctime)s [%(levelname)s] %(name)s: %(message)s' {posargs}
commands = # see setup.cfg for options sent to pytest and coverage
coverage run --source=cloudbridge -m pytest -n 5 tests/ -v {posargs}
setenv =
# Fix for moto import issue: https://github.com/travis-ci/travis-ci/issues/7940
BOTO_CONFIG=/dev/null
Expand All @@ -30,8 +30,9 @@ passenv =
mock: CB_IMAGE_AWS,CB_VM_TYPE_AWS,CB_PLACEMENT_AWS,AWS_ACCESS_KEY,AWS_SECRET_KEY
deps =
-rrequirements.txt
coverage<5
coverage
pytest-xdist

[testenv:lint]
commands = flake8 cloudbridge tests setup.py
deps = flake8
deps = flake8
Loading