11 Commits

Author SHA1 Message Date
Bob Girard
d64ce6cc01 Bundle tests with applications
- For each application, add ./tests directory and __init__.py file
  within it.

- Modify test controllers (coverage.py, runtests.py) to find the new
  test directories for testing and coverage analysis.

- Move existing application-specific test modules (test_pagekite.py) to
  the newly created directories.
2015-06-26 12:05:48 +05:30
Sunil Mohan Adapa
cf1bb65a0c tests: Minor styling fixes and updates
- Add module level comments.

- Add comments to reflect docstring styling.

- Since most tests can no longer be run directly, remove __main__
  invocation uniformly from all the tests.

- Remove unnecessary test settings and let them take default values.

- Add license header to test settings module.

- Fix a minor issue actions test tear down.

- Improve key/value store tests.
2015-05-24 12:16:51 +05:30
Bob Girard
5cadd223d5 Add support for testing Django-dependent modules
- Add django-test-settings.py for Django settings
- Add runtests.py for setting up Django test environment
- Add Django test setup support to setup.py and coverage.py
- Add new test module test_kvstore.py
- Enable existing Django-dependent tests in test_context_processors.py and test_menu.py
2015-05-23 13:59:49 +05:30
Bob Girard
41d6cae0a9 Enable integration of Plinth with Travis-CI
- Add files .travis.yml and requirements.txt
- In setup.py, remove 'pygobject' from install_requires
- In setup.py, add 'pyyaml' to install_requires
- Add file plinth/tests/coverage/__init__.py
- Rename file plinth/tests/coverage/test_coverage.py to coverage.py
- In plinth/tests/coverage/coverage.py, rename class TestCoverageCommand
  to CoverageCommand
2015-04-01 16:12:59 -07:00
Bob Girard
c72c03890c Add detailed test coverage console report
* Add a detailed console report to the 'test_coverage' command output
* Expand the precision of all coverage percentages to two decimal places
* Print the location of the HTML coverage report at the end of the console report
2015-01-25 10:52:44 +05:30
Sunil Mohan Adapa
733a4fd139 Minor styling fixes for test coverage script 2014-12-07 11:39:38 +05:30
Sunil Mohan Adapa
5016087d5c Move coverage to test dependency and install it properly
- Coverage should only be required if running tests

- When running test_coverage command all the install dependencies and
  test dependencies should be installed.
2014-12-07 11:38:33 +05:30
Sunil Mohan Adapa
a0cd525b96 Add explicit license from test coverage script
The license on the blog post is GPLv3+.  The derived work can't be of
any other license but GPLv3+.
2014-12-07 11:33:10 +05:30
Sunil Mohan Adapa
3444d5e314 Don't fail setup.py when without coverage module 2014-12-07 11:10:37 +05:30
fonfon
ff36dd1010 print coverage at the end of the test; minor pep8 fixes 2014-12-07 10:40:51 +05:30
Bob Girard
a502da63d5 Add test coverage measurement and reporting
- Implement coverage functionality as a setuptools Command subclass
  (in plinth/tests/coverage/test_coverage.py)
- Register the new 'test_coverage' command in setup.py
- Modify the INSTALL file to specify python3-coverage as a new dependency
- Modify the HACKING file to document the new 'test_coverage' command
- Have git (via .gitignore) ignore the '.coverage' output data file and
  the contents of the 'plinth/tests/coverage/report' directory
2014-12-06 18:14:42 +05:30