Changes between Version 40 and Version 41 of GSoC/2014/TestingFrameworkForGRASS
- Timestamp:
- 06/23/14 18:47:40 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC/2014/TestingFrameworkForGRASS
v40 v41 244 244 || [https://pypi.python.org/pypi/pyflakes PyFlakes] || errors || || || 245 245 || [https://pypi.python.org/pypi/mccabe McCabe complexity checker] || code [http://en.wikipedia.org/wiki/Cyclomatic_complexity cyclomatic complexity] || || 246 || [https://pypi.python.org/pypi/flake8 Flake8] || combines !PyFlakes, pep8, and mccabe || yes || ||246 || [https://pypi.python.org/pypi/flake8 Flake8] || combines !PyFlakes, pep8, pep8-naming (if installed) and mccabe || yes || || 247 247 || [https://github.com/GreenSteam/pep257 pep257] || docstring style ([http://legacy.python.org/dev/peps/pep-0257/ PEP257]) || no || || 248 || [https://github.com/flintwork/pep8-naming pep8-naming] || naming conventions ([http://legacy.python.org/dev/peps/pep-0008/#naming-conventions PEP8]) || || || 249 || [https://github.com/landscapeio/dodgy dodgy] || checking strange texts in source code (passwords, diffs) || no || no || 250 || [https://github.com/timothycrosley/frosted frosted] || !PyFlakes fork || yes || || 251 || [https://github.com/landscapeio/prospector prospector]|| combines Pylint, !PyFlakes, McCabe, pep8, pep8-naming, dodgy, frosted || no || yes || 248 252 249 253 The determining code coverage of the tests must be done during testing. Speaking about Python, some more advanced testing frameworks includes code coverage tools in them, namely [http://nedbatchelder.com/code/coverage/ coverage]. Since `unittest` does not include `coverage`, GRASS will have to incorporate `coverage` into its testing framework. The basic usage is rather simple. If we consider that all is running in one Python process, we can just put the following (rather messy) code into some module which will be loaded before the tests will start (the main invoking script would be of course the best place):