#4501: Coverage support for tests ----------------------------------------+----------------------------------- Reporter: b...@almad.net | Owner: ericholscher Status: new | Milestone: Component: Testing framework | Version: SVN Resolution: | Keywords: Stage: Accepted | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | ----------------------------------------+----------------------------------- Comment (by gsong):
Hi Eric, I was wondering what your progress is on this ticket. I didn't realize this was an open ticket and did a lot of work around ``coverage`` over the weekend. In any case, here's actual HTML output from my tests, is this kind of what we're looking for? My test runner generates the simple plain text output to `sys.stdout` as well, but I didn't find that too useful. http://lehrhaus.55minutes.com/test_report/ In any case, I have the following parameters in my `settings`: {{{ # Specify which style you want the listing to be in # 'path' or 'module' # 'path': '/myhome/project/package/module' # 'module': 'package.module' COVERAGE_TEST_LIST_STYLE = 'module' # Specify regular expressions of code blocks you would like to ignore # in the coverage test COVERAGE_TEST_EXCLUDES = ( 'def __unicode__\(self\):', 'def get_absolute_url\(self\):', ) # Specify regular expressions of paths to exclude COVERAGE_TEST_PATH_BLACKLIST = ( r'django%sdjango' %re.escape(os.path.sep), r'.svn', 'tests', 'settings', '__init__', 'urls', 'common.*views.*test', ) COVERAGE_TEST_HTML_OUTPUT_DIR = 'test_html' }}} I'm ignoring core Django modules, but can obviously include them if we wanted to. I'm not that familiar with `runtests` so I didn't bother looking at that at all. I approached this from the perspective of the application developer, not the framework developer. My idea was to package it up as a third-party app with a custom `manage.py` command. -- Ticket URL: <http://code.djangoproject.com/ticket/4501#comment:10> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---