Skip to content

Commit

Permalink
Run tests through python setup.py test (#50)
Browse files Browse the repository at this point in the history
Amend the package to run tests standalone
  • Loading branch information
jonathan-s authored and Aiky30 committed Sep 4, 2019
1 parent 5394ad8 commit d244e54
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ local.sqlite
htmlcov/
.python-version
!djangocms_versioning/static/djangocms_versioning/js/dist
venv
15 changes: 15 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ Run::

to perform the application's database migrations.


Running Tests
=============

You can run all the tests by executing:

python -m venv venv
source venv/bin/activate
python setup.py test

# Alternatively you could run the test runner stand-alone
pip install -r tests/requirements.txt
python tests.settings.py


App Integration
===============

Expand Down
16 changes: 16 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
"django-treebeard>=4.3",
]

TEST_REQUIREMENTS = [
"djangocms_helper",
"djangocms_versioning",
"djangocms_version_locking",
"djangocms-moderation",
"factory_boy",
"django_cms"
]


setup(
name="djangocms-navigation",
Expand All @@ -29,4 +38,11 @@
url="https://github.com/fidelityInternational/djangocms-navigation",
license="BSD",
test_suite="tests.settings.run",
tests_require=TEST_REQUIREMENTS,
dependency_links=[
"http://github.com/divio/django-cms/tarball/release/4.0.x#egg=django-cms-4.0.0",
"http://github.com/divio/djangocms-versioning/tarball/master#egg=djangocms-versioning-0.0.23",
"http://github.com/divio/djangocms-moderation/tarball/release/1.0.x#egg=djangocms-moderation-1.0.x",
"http://github.com/FidelityInternational/djangocms-version-locking/tarball/master#egg=djangocms-version-locking-0.0.13",
]
)
4 changes: 4 additions & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@ djangocms-helper
tox
coverage
isort
factory_boy
git+git://github.com/divio/djangocms-versioning.git#egg=djangocms-versioning
git+git://github.com/FidelityInternational/djangocms-version-locking.git#egg=djangocms-version-locking
git+git://github.com/divio/djangocms-moderation.git#egg=djangocms-moderation

0 comments on commit d244e54

Please sign in to comment.