Skip to content

Commit

Permalink
Using pytest to run tests
Browse files Browse the repository at this point in the history
ECOM-6842
  • Loading branch information
clintonb committed Jan 15, 2017
1 parent f7b11d6 commit 045d37d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[pytest]
DJANGO_SETTINGS_MODULE=test_settings
addopts = --cov auth_backends --cov-report term-missing --cov-report xml
testpaths = auth_backends/tests
4 changes: 3 additions & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
coverage>=4.3.1,<5.0.0
ddt>=1.1.1,<2.0.0
django-nose>=1.4.3,<2.0.0
edx-lint>=0.5.2,<1.0.0
httpretty>=0.8.14,<1.0.0
mock>=2.0.0,<3.0.0
pep8>=1.7.0,<2.0.0
pytest-catchlog>=1.2.2,<2.0.0
pytest-cov>=2.4.0,<3.0.0
pytest-django>=3.1.2,<4.0.0
tox>=2.3.2,<3.0.0
unittest2>=1.1.0,<2.0.0
3 changes: 0 additions & 3 deletions test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django_nose',
'social.apps.django_app.default',
'auth_backends',
)
Expand All @@ -38,8 +37,6 @@
'django.middleware.clickjacking.XFrameOptionsMiddleware',
]

TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'

SOCIAL_AUTH_EDX_OIDC_URL_ROOT = 'http://example.com'
SOCIAL_AUTH_EDX_OIDC_KEY = 'dummy-key'
SOCIAL_AUTH_EDX_OIDC_SECRET = 'dummy-secret'
Expand Down
3 changes: 1 addition & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ deps =
-rtest_requirements.txt

commands =
django-admin.py test auth_backends --settings=test_settings --with-coverage --cover-package=auth_backends
coverage report
pytest {posargs}

[testenv:quality]
commands =
Expand Down

0 comments on commit 045d37d

Please sign in to comment.