20 Commits

Author SHA1 Message Date
Bob Girard
15161e10b1 Eliminate renaming plinth.config file for tests
- Instead of renaming plinth.config, make a copy and run all feasible
  tests on the copy, then delete the copy.
2015-02-13 11:33:35 -07:00
Sunil Mohan Adapa
e69b500247 Add to context processor and menu test cases
- Minor style updates to other tests
2015-01-30 18:11:37 +05:30
Bob Girard
f184c23c31 Add unit tests (#1)
* Add unit tests for cfg.py, context_processors.py, and menu.py
* Add new plinth/tests/data directory for miscellaneous test data
* In cfg.py, add an explicit check to verify the existence of the secondary
  (non-default) plinth.config file
* In cfg.py, replace deprecated configparser.SafeConfigParser with
  configparser.ConfigParser
2015-01-30 18:11:36 +05:30
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
fonfon
ae83566653 removed unused 'title' from subsubmenus 2014-12-15 15:54:40 +01:00
Sunil Mohan Adapa
10496d89a5 Refactor templatetags and tests for styling 2014-12-14 08:51:13 +05:30
fonfon
97fe5714e2 Fix subsubmenu highlighting bug and add tests 2014-12-09 23:32:06 +01:00
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
Sunil Mohan Adapa
5b969d9d30 Explicitly write license headers for each source file
The package license (AGPL3+) implicitly indicates the license of each
file.  However, it is desirable to have license headers in each file.
This is the case for many prominent projects like GNU project, Mozilla
etc.
2014-11-30 14:49:49 +05:30
Sunil Mohan Adapa
c9d8bb9d00 Require and use Python3 2014-10-01 11:31:51 +05:30
Sunil Mohan Adapa
4cc2dc4546 Launch test cases using "setup.py test" 2014-08-31 14:24:00 +05:30
Sunil Mohan Adapa
e0816cd432 Update test cases for new directory structure 2014-08-30 09:33:53 +05:30
Sunil Mohan Adapa
709a540381 Rename test cases to have python standard name 2014-08-30 09:18:36 +05:30
Sunil Mohan Adapa
64b6a1294e Remove unused testdata directory 2014-08-30 09:17:21 +05:30
Sunil Mohan Adapa
65fa648d9f Reorganize python sources into 'plinth' package 2014-08-29 12:57:27 +05:30