nosexcover-1.0.7/0000755000076500000240000000000011631444044014146 5ustar chrisstaff00000000000000nosexcover-1.0.7/nosexcover/0000755000076500000240000000000011631444044016341 5ustar chrisstaff00000000000000nosexcover-1.0.7/nosexcover/__init__.py0000644000076500000240000000003011600163401020432 0ustar chrisstaff00000000000000from nosexcover import *nosexcover-1.0.7/nosexcover/nosexcover.py0000644000076500000240000000421011600212353021073 0ustar chrisstaff00000000000000"""Companion to nose.plugins.cover. Enable by adding --with-xcoverage to your arguments. A Cobertura-style XML file, honoring the options you pass to --with-coverage, will be generated in coverage.xml""" import logging import sys from nose.plugins import cover, Plugin log = logging.getLogger('nose.plugins.xcover') class XCoverage(cover.Coverage): """ Add Cobertura-style XML coverage reports to the built-in nose.plugins.cover plugin. """ def options(self, parser, env): """ Add options to command line. """ Plugin.options(self, parser, env) parser.add_option('--xcoverage-file', action='store', default=env.get('NOSE_XCOVER_FILE', 'coverage.xml'), dest='xcoverage_file', metavar="FILE", help='Path to xml coverage report.' 'Default is coverage.xml in the working directory. ' '[NOSE_XCOVERAGE_FILE]') def configure(self, options, config): coverage_on = options.enable_plugin_coverage xcoverage_on = options.enable_plugin_xcoverage if xcoverage_on and coverage_on: log.error( """You can not use both --with-xcover and --with-coverage. Using --with-xcover implies --with-coverage""") raise TypeError super(XCoverage, self).configure(options, config) self.xcoverageFile = options.xcoverage_file def report(self, stream): """ Output code coverage report. """ super(XCoverage, self).report(stream) if not hasattr(self, 'coverInstance'): # nose coverage plugin 1.0 and earlier import coverage self.coverInstance = coverage._the_coverage modules = [module for name, module in sys.modules.items() if self.wantModuleCoverage(name, module)] log.debug("Coverage report will cover modules: %s", modules) morfs = [m.__file__ for m in modules if hasattr(m, '__file__')] self.coverInstance.xml_report(morfs, outfile=self.xcoverageFile) nosexcover-1.0.7/nosexcover/tests.py0000644000076500000240000000004211600175503020046 0ustar chrisstaff00000000000000def test_sanity(): assert Truenosexcover-1.0.7/nosexcover.egg-info/0000755000076500000240000000000011631444044020033 5ustar chrisstaff00000000000000nosexcover-1.0.7/nosexcover.egg-info/dependency_links.txt0000644000076500000240000000000111631444044024101 0ustar chrisstaff00000000000000 nosexcover-1.0.7/nosexcover.egg-info/entry_points.txt0000644000076500000240000000005611631444044023332 0ustar chrisstaff00000000000000[nose.plugins] xcover = nosexcover:XCoverage nosexcover-1.0.7/nosexcover.egg-info/not-zip-safe0000644000076500000240000000000111600163433022255 0ustar chrisstaff00000000000000 nosexcover-1.0.7/nosexcover.egg-info/PKG-INFO0000644000076500000240000000262611631444044021136 0ustar chrisstaff00000000000000Metadata-Version: 1.0 Name: nosexcover Version: 1.0.7 Summary: Extends nose.plugins.cover to add Cobertura-style XML reports Home-page: http://github.com/cmheisel/nose-xcover/ Author: Chris Heisel Author-email: chris@heisel.org License: BSD Description: nose-xmlcover -------------- A companion to the built-in nose.plugins.cover, this plugin will write out an XML coverage report to a file named coverage.xml. It will honor all the options you pass to the `Nose coverage plugin `_, especially --cover-package. Usage ------ You can not use both --with-xcover and --with-coverage. Using --with-xcover implies --with-coverage As of nose-xcover 1.0.6 --with-xcoverage provides all the functionality of the built-in coverage plugin in addition to Cobertura-style output:: #nosetests --with-xcoverage {{ coverage options }} nosetests --with-xcoverage --cover-package=myapp --cover-tests Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules nosexcover-1.0.7/nosexcover.egg-info/requires.txt0000644000076500000240000000002211631444044022425 0ustar chrisstaff00000000000000nose coverage>=3.4nosexcover-1.0.7/nosexcover.egg-info/SOURCES.txt0000644000076500000240000000047311631444044021723 0ustar chrisstaff00000000000000setup.py nosexcover/__init__.py nosexcover/nosexcover.py nosexcover/tests.py nosexcover.egg-info/PKG-INFO nosexcover.egg-info/SOURCES.txt nosexcover.egg-info/dependency_links.txt nosexcover.egg-info/entry_points.txt nosexcover.egg-info/not-zip-safe nosexcover.egg-info/requires.txt nosexcover.egg-info/top_level.txtnosexcover-1.0.7/nosexcover.egg-info/top_level.txt0000644000076500000240000000001311631444044022557 0ustar chrisstaff00000000000000nosexcover nosexcover-1.0.7/PKG-INFO0000644000076500000240000000262611631444044015251 0ustar chrisstaff00000000000000Metadata-Version: 1.0 Name: nosexcover Version: 1.0.7 Summary: Extends nose.plugins.cover to add Cobertura-style XML reports Home-page: http://github.com/cmheisel/nose-xcover/ Author: Chris Heisel Author-email: chris@heisel.org License: BSD Description: nose-xmlcover -------------- A companion to the built-in nose.plugins.cover, this plugin will write out an XML coverage report to a file named coverage.xml. It will honor all the options you pass to the `Nose coverage plugin `_, especially --cover-package. Usage ------ You can not use both --with-xcover and --with-coverage. Using --with-xcover implies --with-coverage As of nose-xcover 1.0.6 --with-xcoverage provides all the functionality of the built-in coverage plugin in addition to Cobertura-style output:: #nosetests --with-xcoverage {{ coverage options }} nosetests --with-xcoverage --cover-package=myapp --cover-tests Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: BSD License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Topic :: Software Development :: Libraries :: Python Modules nosexcover-1.0.7/setup.cfg0000644000076500000240000000007311631444045015770 0ustar chrisstaff00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 nosexcover-1.0.7/setup.py0000644000076500000240000000171211631443637015670 0ustar chrisstaff00000000000000from setuptools import setup, find_packages try: desc = file.read(open('README.rst')) except StandardError: desc = 'see README.rst' setup( name='nosexcover', version='1.0.7', description='Extends nose.plugins.cover to add Cobertura-style XML reports', long_description=desc, author='Chris Heisel', author_email='chris@heisel.org', url='http://github.com/cmheisel/nose-xcover/', license='BSD', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=['nose', 'coverage>=3.4'], classifiers=[ 'Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Topic :: Software Development :: Libraries :: Python Modules', ], entry_points={ 'nose.plugins': ['xcover = nosexcover:XCoverage'] }, )