Skip to content

Commit

Permalink
Merge pull request #43 from edx/pytest-BOM-1077
Browse files Browse the repository at this point in the history
Pytest integration
  • Loading branch information
mraarif authored Dec 4, 2019
2 parents 65bb9e9 + a127fe3 commit efb1ab3
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 28 deletions.
6 changes: 6 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[pytest]
DJANGO_SETTINGS_MODULE = settings
addopts = --cov . --cov-report term-missing --cov-report html
norecursedirs = .git .tox .* CVS _darcs {arch} *.egg

testpaths = milestones
19 changes: 12 additions & 7 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
#
argparse==1.4.0
astroid==1.6.6
atomicwrites==1.3.0
attrs==19.3.0
backports.functools-lru-cache==1.6.1
caniusepython3==7.2.0
certifi==2019.9.11
certifi==2019.11.28
chardet==3.0.4
click-log==0.3.2
click==7.0
Expand All @@ -19,22 +21,21 @@ contextlib2==0.6.0.post1
coverage==4.5.4
distlib==0.3.0
django-model-utils==3.2.0
django-nose==1.4.6
django==1.11.26
edx-lint==1.4.1
edx-opaque-keys==2.0.1
enum34==1.1.6
filelock==3.0.12
funcsigs==1.0.2
futures==3.3.0 ; python_version == "2.7"
idna==2.8
importlib-metadata==0.23
importlib-metadata==1.1.0
isort==4.3.21
jinja2==2.10.3
lazy-object-proxy==1.4.3
markupsafe==1.1.1
mccabe==0.6.1
more-itertools==5.0.0
nose==1.3.7
packaging==19.2
pathlib2==2.3.5
pbr==5.4.4
Expand All @@ -49,9 +50,12 @@ pylint-plugin-utils==0.6
pylint==1.9.5
pymongo==3.9.0
pyparsing==2.4.5
pytest-cov==2.8.1
pytest-django==3.7.0
pytest==4.6.6
python-slugify==4.0.0
pytz==2019.3
pyyaml==5.1.2
pyyaml==5.2
requests==2.22.0
scandir==1.10.0
singledispatch==3.4.0.3
Expand All @@ -61,11 +65,12 @@ stevedore==1.31.0
text-unidecode==1.3
toml==0.10.0
tox-battery==0.5.1
tox==3.14.1
tox==3.14.2
urllib3==1.25.7
virtualenv==16.7.8
wcwidth==0.1.7
wrapt==1.11.2
zipp==0.6.0

# The following packages are considered to be unsafe in a requirements file:
# setuptools==42.0.1 # via caniusepython3
# setuptools
29 changes: 21 additions & 8 deletions requirements/quality.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,51 +6,64 @@
#
argparse==1.4.0 # via caniusepython3
astroid==1.6.6 # via pylint, pylint-celery
atomicwrites==1.3.0
attrs==19.3.0
backports.functools-lru-cache==1.6.1 # via astroid, caniusepython3, isort, pylint
caniusepython3==7.2.0
certifi==2019.9.11 # via requests
certifi==2019.11.28 # via requests
chardet==3.0.4 # via requests
click-log==0.3.2 # via edx-lint
click==7.0
code-annotations==0.3.2
configparser==4.0.2 # via pydocstyle, pylint
configparser==4.0.2
contextlib2==0.6.0.post1
coverage==4.5.4
distlib==0.3.0 # via caniusepython3
django-model-utils==3.2.0
django-nose==1.4.6
django==1.11.26
edx-lint==1.4.1
edx-opaque-keys==2.0.1
enum34==1.1.6 # via astroid
funcsigs==1.0.2
futures==3.3.0 ; python_version == "2.7" # via caniusepython3, isort
idna==2.8 # via requests
importlib-metadata==1.1.0
isort==4.3.21
jinja2==2.10.3
lazy-object-proxy==1.4.3 # via astroid
markupsafe==1.1.1
mccabe==0.6.1 # via pylint
nose==1.3.7
packaging==19.2 # via caniusepython3
more-itertools==5.0.0
packaging==19.2
pathlib2==2.3.5
pbr==5.4.4
pluggy==0.13.1
py==1.8.0
pycodestyle==2.5.0
pydocstyle==3.0.0
pylint-celery==0.3 # via edx-lint
pylint-django==0.11.1 # via edx-lint
pylint-plugin-utils==0.6 # via pylint-celery, pylint-django
pylint==1.9.5 # via edx-lint, pylint-celery, pylint-django, pylint-plugin-utils
pymongo==3.9.0
pyparsing==2.4.5 # via packaging
pyparsing==2.4.5
pytest-cov==2.8.1
pytest-django==3.7.0
pytest==4.6.6
python-slugify==4.0.0
pytz==2019.3
pyyaml==5.1.2
pyyaml==5.2
requests==2.22.0 # via caniusepython3
scandir==1.10.0
singledispatch==3.4.0.3 # via astroid, pylint
six==1.13.0
snowballstemmer==2.0.0 # via pydocstyle
stevedore==1.31.0
text-unidecode==1.3
urllib3==1.25.7 # via requests
wcwidth==0.1.7
wrapt==1.11.2 # via astroid
zipp==0.6.0

# The following packages are considered to be unsafe in a requirements file:
# setuptools==42.0.1 # via caniusepython3
# setuptools
5 changes: 3 additions & 2 deletions requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@

code-annotations # Provides commands used by the pii_check make target
coverage
django_nose>=1.4.1
nose
pytest
pytest-django
pytest-cov
22 changes: 19 additions & 3 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,36 @@
#
# make upgrade
#
atomicwrites==1.3.0 # via pytest
attrs==19.3.0 # via pytest
click==7.0 # via code-annotations
code-annotations==0.3.2
configparser==4.0.2 # via importlib-metadata
contextlib2==0.6.0.post1 # via importlib-metadata
coverage==4.5.4
django-model-utils==3.2.0
django-nose==1.4.6
edx-opaque-keys==2.0.1
funcsigs==1.0.2 # via pytest
importlib-metadata==1.1.0 # via pluggy, pytest
jinja2==2.10.3 # via code-annotations
markupsafe==1.1.1 # via jinja2
nose==1.3.7
more-itertools==5.0.0 # via pytest, zipp
packaging==19.2 # via pytest
pathlib2==2.3.5 # via importlib-metadata, pytest, pytest-django
pbr==5.4.4
pluggy==0.13.1 # via pytest
py==1.8.0 # via pytest
pymongo==3.9.0
pyparsing==2.4.5 # via packaging
pytest-cov==2.8.1
pytest-django==3.7.0
pytest==4.6.6
python-slugify==4.0.0 # via code-annotations
pytz==2019.3
pyyaml==5.1.2 # via code-annotations
pyyaml==5.2 # via code-annotations
scandir==1.10.0 # via pathlib2
six==1.13.0
stevedore==1.31.0
text-unidecode==1.3 # via python-slugify
wcwidth==0.1.7 # via pytest
zipp==0.6.0 # via importlib-metadata
6 changes: 3 additions & 3 deletions requirements/travis.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
#
# make upgrade
#
certifi==2019.9.11 # via requests
certifi==2019.11.28 # via requests
chardet==3.0.4 # via requests
codecov==2.0.15
configparser==4.0.2 # via importlib-metadata
contextlib2==0.6.0.post1 # via importlib-metadata
coverage==4.5.4 # via codecov
filelock==3.0.12 # via tox
idna==2.8 # via requests
importlib-metadata==0.23 # via pluggy, tox
importlib-metadata==1.1.0 # via pluggy, tox
more-itertools==5.0.0 # via zipp
packaging==19.2 # via tox
pathlib2==2.3.5 # via importlib-metadata
Expand All @@ -24,7 +24,7 @@ scandir==1.10.0 # via pathlib2
six==1.13.0 # via more-itertools, packaging, pathlib2, tox
toml==0.10.0 # via tox
tox-battery==0.5.1
tox==3.14.1
tox==3.14.2
urllib3==1.25.7 # via requests
virtualenv==16.7.8 # via tox
zipp==0.6.0 # via importlib-metadata
5 changes: 1 addition & 4 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from __future__ import unicode_literals
DEBUG = True
TEST_MODE = True
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
TRANSACTIONS_MANAGED = {}
USE_TZ = False
TIME_ZONE = {}
Expand All @@ -26,9 +25,7 @@
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',

'milestones',
'django_nose',
'milestones'
)

MIDDLEWARE_CLASSES = {}
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ deps =
-r{toxinidir}/requirements/test.txt

commands =
coverage run manage.py test --verbosity=3
python -Wd -m pytest {posargs}
coverage report -m
coverage html

Expand Down

0 comments on commit efb1ab3

Please sign in to comment.