Skip to content

Commit

Permalink
Switch to pytest (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang authored Sep 6, 2023
1 parent a582cc4 commit bcbdfd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
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

0 comments on commit bcbdfd5

Please sign in to comment.