2013-08-22 08:17:59 +00:00
|
|
|
Testing
|
2014-02-21 19:54:54 +00:00
|
|
|
=======
|
2013-08-22 08:17:59 +00:00
|
|
|
|
2013-08-22 12:31:33 +00:00
|
|
|
Requirements
|
2014-02-21 19:54:54 +00:00
|
|
|
------------
|
2013-08-22 12:31:33 +00:00
|
|
|
|
2016-04-14 15:08:38 +00:00
|
|
|
The library needs a copy of ``Django``, e.g.::
|
2013-08-22 12:31:33 +00:00
|
|
|
|
2014-02-21 19:54:54 +00:00
|
|
|
pip install Django
|
2013-08-22 12:31:33 +00:00
|
|
|
|
2016-04-14 15:08:38 +00:00
|
|
|
And several libraries that can be installed from the root of
|
|
|
|
|
a source checkout::
|
|
|
|
|
|
|
|
|
|
pip install -r embed_video/tests/test-requirements.txt
|
|
|
|
|
|
|
|
|
|
It's recommended to make a separate virtual environment where you
|
|
|
|
|
install these packages.
|
2013-08-22 12:31:33 +00:00
|
|
|
|
|
|
|
|
Running tests
|
2014-02-21 19:54:54 +00:00
|
|
|
-------------
|
2013-08-22 12:31:33 +00:00
|
|
|
|
2016-04-14 15:08:38 +00:00
|
|
|
Run tests in your virtual environment with this command:
|
2013-08-22 08:17:59 +00:00
|
|
|
|
|
|
|
|
::
|
|
|
|
|
|
2013-08-22 12:33:24 +00:00
|
|
|
nosetests
|
2013-08-22 08:17:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Be sure to run it before each commit and fix broken tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Run tests with coverage:
|
|
|
|
|
|
|
|
|
|
::
|
2014-02-21 19:54:54 +00:00
|
|
|
|
2013-08-22 12:33:24 +00:00
|
|
|
nosetests --with-coverage --cover-package=embed_video
|
2013-12-21 16:12:04 +00:00
|
|
|
|
2016-04-14 15:08:38 +00:00
|
|
|
Use tox if you want to test against all supported Django versions,
|
|
|
|
|
similar to the Travis build. Install it once::
|
|
|
|
|
|
|
|
|
|
pip install tox>=2.0
|
|
|
|
|
|
|
|
|
|
Run the tests with::
|
2013-12-21 16:12:04 +00:00
|
|
|
|
2016-04-14 15:08:38 +00:00
|
|
|
tox
|