nose-cov-1.6/0000775000175000017500000000000012020324757014253 5ustar dpowelldpowell00000000000000nose-cov-1.6/nose_cov.py0000644000175000017500000000462411727041646016452 0ustar dpowelldpowell00000000000000"""Coverage plugin for nose.""" import logging from nose.plugins.base import Plugin log = logging.getLogger(__name__) class Cov(Plugin): """Activate cov plugin to generate coverage reports""" score = 200 status = {} def options(self, parser, env): """Add options to control coverage.""" log.debug('nose-cov options') Plugin.options(self, parser, env) parser.add_option('--cov', action='append', default=env.get('NOSE_COV', []), metavar='PATH', dest='cov_source', help=('Measure coverage for filesystem path ' '[NOSE_COV]')) parser.add_option('--cov-report', action='append', default=env.get('NOSE_COV_REPORT', []), metavar='TYPE', choices=['term', 'term-missing', 'annotate', 'html', 'xml'], dest='cov_report', help=('Generate selected reports, available types: term, term-missing, annotate, html, xml ' '[NOSE_COV_REPORT]')) parser.add_option('--cov-config', action='store', default=env.get('NOSE_COV_CONFIG', '.coveragerc'), metavar='FILE', dest='cov_config', help=('Config file for coverage, default: .coveragerc ' '[NOSE_COV_CONFIG]')) def configure(self, options, config): """Activate coverage plugin if appropriate.""" log.debug('nose-cov configure') try: self.status.pop('active') except KeyError: pass Plugin.configure(self, options, config) if self.enabled and not config.worker: self.status['active'] = True self.cov_source = options.cov_source or ['.'] self.cov_report = options.cov_report or ['term'] self.cov_config = options.cov_config else: self.enabled = False def begin(self): """Erase any previous coverage data and start coverage.""" import cov_core log.debug('nose-cov begin') self.cov_controller = cov_core.Central(self.cov_source, self.cov_report, self.cov_config) self.cov_controller.start() def report(self, stream): """Produce coverage reports.""" log.debug('nose-cov report') self.cov_controller.finish() self.cov_controller.summary(stream) nose-cov-1.6/PKG-INFO0000664000175000017500000002071212020324757015352 0ustar dpowelldpowell00000000000000Metadata-Version: 1.1 Name: nose-cov Version: 1.6 Summary: nose plugin for coverage reporting, including subprocesses and multiprocessing Home-page: http://bitbucket.org/memedough/nose-cov/overview Author: Meme Dough Author-email: memedough@gmail.com License: MIT License Description: nose-cov ======== This plugin produces coverage reports. It also supports coverage of subprocesses. All features offered by the coverage package should be available, either through nose-cov or through coverage's config file. Installation ------------ Install with pip:: pip install nose-cov .. NOTE:: Ensure you use pip instead of easy_install as the latter does not correctly install the init_cov_core.pth file needed for subprocess measurement. Uninstallation -------------- Uninstall with pip:: pip uninstall nose-cov pip uninstall cov-core .. NOTE:: Ensure that you manually delete the init_cov_core.pth file in your site-packages directory. This file starts coverage collection of subprocesses if appropriate during site initialisation at python startup. Usage ----- The following will report on the combined coverage of the main process and all of it's subprocesses:: nosetests --with-cov --cov myproj tests/ Shows a terminal report:: ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- Reporting --------- It is possible to generate any combination of the reports for a single test run. The available reports are terminal (with or without missing line numbers shown), HTML, XML and annotated source code. The terminal report without line numbers (default):: nosetests --with-cov --cov-report term --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The terminal report with line numbers:: nosetests --with-cov --cov-report term-missing --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover Missing -------------------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% 24-26, 99, 149, 233-236, 297-298, 369-370 myproj/feature4286 94 9 90% 37, 40, 183-188, 197 -------------------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The remaining three reports output to files without showing anything on the terminal (useful for when the output is going to a continuous integration server):: nosetests --with-cov --cov-report html --cov-report xml --cov-report annotate --cov myproj tests/ Coverage Data File ------------------ The data file is erased at the beginning of testing to ensure clean data for each test run. The data file is left at the end of testing so that it is possible to use normal coverage tools to examine it. Coverage Config File -------------------- This plugin provides a clean minimal set of command line options that are added to nosetests. For further control of coverage use a coverage config file. For example if tests are contained within the directory tree being measured the tests may be excluded if desired by using a .coveragerc file with the omit option set:: nosetests --cov-config .coveragerc --cov myproj myproj/tests/ Where the .coveragerc file contains file globs:: [run] omit = tests/* For full details refer to the `coverage config file`_ documentation. .. _`coverage config file`: http://nedbatchelder.com/code/coverage/config.html Note that this plugin controls some options and setting the option in the config file will have no effect. These include specifying source to be measured (source option) and all data file handling (data_file and parallel options). Limitations ----------- For subprocess measurement environment variables must make it from the main process to the subprocess. The python used by the subprocess must have nose-cov installed. The subprocess must do normal site initialisation so that the environment variables can be detected and coverage started. Nose Multiprocess Plugin ------------------------ The nose cov plugin partially works with the nose multiprocess plugin. The nose multiprocess plugin does not join with its child processes so nose cov plugin has coverage measured but can't merge coverage results and report them. Work around by using cov plugin and multiprocess plugin together to run tests, note coverage report from this command will be incorrect:: nosetests --with-cov --processes=4 tests/ After there will be coverage data files for the main nose process and each subprocess:: .coverage .coverage.hostname.7323.198266 .coverage.hostname.7339.177156 .coverage.hostname.7358.543616 .coverage.hostname.7393.997428 Tell coverage to merge coverage results into one coverage data file:: coverage combine Tell coverage to report:: coverage report Acknowledgements ---------------- Whilst this plugin has been built fresh from the ground up it has been influenced by the work done on pytest-coverage (Ross Lawley, James Mills, Holger Krekel) and nose-cover (Jason Pellerin) which are other coverage plugins. Ned Batchelder for coverage and its ability to combine the coverage results of parallel runs. Holger Krekel for pytest with its distributed testing support. Jason Pellerin for nose. Michael Foord for unittest2. No doubt others have contributed to these tools as well. Keywords: nose nosetest cover coverage Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.4 Classifier: Programming Language :: Python :: 2.5 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.0 Classifier: Programming Language :: Python :: 3.1 Classifier: Topic :: Software Development :: Testing nose-cov-1.6/LICENSE.txt0000644000175000017500000000205711420207705016074 0ustar dpowelldpowell00000000000000The MIT License Copyright (c) 2010 Meme Dough Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. nose-cov-1.6/setup.cfg0000664000175000017500000000007312020324757016074 0ustar dpowelldpowell00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 nose-cov-1.6/README.txt0000644000175000017500000001400712020322255015740 0ustar dpowelldpowell00000000000000nose-cov ======== This plugin produces coverage reports. It also supports coverage of subprocesses. All features offered by the coverage package should be available, either through nose-cov or through coverage's config file. Installation ------------ Install with pip:: pip install nose-cov .. NOTE:: Ensure you use pip instead of easy_install as the latter does not correctly install the init_cov_core.pth file needed for subprocess measurement. Uninstallation -------------- Uninstall with pip:: pip uninstall nose-cov pip uninstall cov-core .. NOTE:: Ensure that you manually delete the init_cov_core.pth file in your site-packages directory. This file starts coverage collection of subprocesses if appropriate during site initialisation at python startup. Usage ----- The following will report on the combined coverage of the main process and all of it's subprocesses:: nosetests --with-cov --cov myproj tests/ Shows a terminal report:: ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- Reporting --------- It is possible to generate any combination of the reports for a single test run. The available reports are terminal (with or without missing line numbers shown), HTML, XML and annotated source code. The terminal report without line numbers (default):: nosetests --with-cov --cov-report term --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The terminal report with line numbers:: nosetests --with-cov --cov-report term-missing --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover Missing -------------------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% 24-26, 99, 149, 233-236, 297-298, 369-370 myproj/feature4286 94 9 90% 37, 40, 183-188, 197 -------------------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The remaining three reports output to files without showing anything on the terminal (useful for when the output is going to a continuous integration server):: nosetests --with-cov --cov-report html --cov-report xml --cov-report annotate --cov myproj tests/ Coverage Data File ------------------ The data file is erased at the beginning of testing to ensure clean data for each test run. The data file is left at the end of testing so that it is possible to use normal coverage tools to examine it. Coverage Config File -------------------- This plugin provides a clean minimal set of command line options that are added to nosetests. For further control of coverage use a coverage config file. For example if tests are contained within the directory tree being measured the tests may be excluded if desired by using a .coveragerc file with the omit option set:: nosetests --cov-config .coveragerc --cov myproj myproj/tests/ Where the .coveragerc file contains file globs:: [run] omit = tests/* For full details refer to the `coverage config file`_ documentation. .. _`coverage config file`: http://nedbatchelder.com/code/coverage/config.html Note that this plugin controls some options and setting the option in the config file will have no effect. These include specifying source to be measured (source option) and all data file handling (data_file and parallel options). Limitations ----------- For subprocess measurement environment variables must make it from the main process to the subprocess. The python used by the subprocess must have nose-cov installed. The subprocess must do normal site initialisation so that the environment variables can be detected and coverage started. Nose Multiprocess Plugin ------------------------ The nose cov plugin partially works with the nose multiprocess plugin. The nose multiprocess plugin does not join with its child processes so nose cov plugin has coverage measured but can't merge coverage results and report them. Work around by using cov plugin and multiprocess plugin together to run tests, note coverage report from this command will be incorrect:: nosetests --with-cov --processes=4 tests/ After there will be coverage data files for the main nose process and each subprocess:: .coverage .coverage.hostname.7323.198266 .coverage.hostname.7339.177156 .coverage.hostname.7358.543616 .coverage.hostname.7393.997428 Tell coverage to merge coverage results into one coverage data file:: coverage combine Tell coverage to report:: coverage report Acknowledgements ---------------- Whilst this plugin has been built fresh from the ground up it has been influenced by the work done on pytest-coverage (Ross Lawley, James Mills, Holger Krekel) and nose-cover (Jason Pellerin) which are other coverage plugins. Ned Batchelder for coverage and its ability to combine the coverage results of parallel runs. Holger Krekel for pytest with its distributed testing support. Jason Pellerin for nose. Michael Foord for unittest2. No doubt others have contributed to these tools as well. nose-cov-1.6/setup.py0000644000175000017500000000311412020324500015744 0ustar dpowelldpowell00000000000000import setuptools setuptools.setup(name='nose-cov', version='1.6', description='nose plugin for coverage reporting, including subprocesses and multiprocessing', long_description=open('README.txt').read().strip(), author='Meme Dough', author_email='memedough@gmail.com', url='http://bitbucket.org/memedough/nose-cov/overview', py_modules=['nose_cov'], install_requires=['nose>=0.11.4', 'cov-core>=1.6'], entry_points={'nose.plugins': ['cov = nose_cov:Cov']}, license='MIT License', zip_safe=False, keywords='nose nosetest cover coverage', classifiers=['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.4', 'Programming Language :: Python :: 2.5', 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.0', 'Programming Language :: Python :: 3.1', 'Topic :: Software Development :: Testing']) nose-cov-1.6/nose_cov.egg-info/0000775000175000017500000000000012020324757017560 5ustar dpowelldpowell00000000000000nose-cov-1.6/nose_cov.egg-info/top_level.txt0000664000175000017500000000001112020324757022302 0ustar dpowelldpowell00000000000000nose_cov nose-cov-1.6/nose_cov.egg-info/PKG-INFO0000664000175000017500000002071212020324757020657 0ustar dpowelldpowell00000000000000Metadata-Version: 1.1 Name: nose-cov Version: 1.6 Summary: nose plugin for coverage reporting, including subprocesses and multiprocessing Home-page: http://bitbucket.org/memedough/nose-cov/overview Author: Meme Dough Author-email: memedough@gmail.com License: MIT License Description: nose-cov ======== This plugin produces coverage reports. It also supports coverage of subprocesses. All features offered by the coverage package should be available, either through nose-cov or through coverage's config file. Installation ------------ Install with pip:: pip install nose-cov .. NOTE:: Ensure you use pip instead of easy_install as the latter does not correctly install the init_cov_core.pth file needed for subprocess measurement. Uninstallation -------------- Uninstall with pip:: pip uninstall nose-cov pip uninstall cov-core .. NOTE:: Ensure that you manually delete the init_cov_core.pth file in your site-packages directory. This file starts coverage collection of subprocesses if appropriate during site initialisation at python startup. Usage ----- The following will report on the combined coverage of the main process and all of it's subprocesses:: nosetests --with-cov --cov myproj tests/ Shows a terminal report:: ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- Reporting --------- It is possible to generate any combination of the reports for a single test run. The available reports are terminal (with or without missing line numbers shown), HTML, XML and annotated source code. The terminal report without line numbers (default):: nosetests --with-cov --cov-report term --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover ---------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% myproj/feature4286 94 9 90% ---------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The terminal report with line numbers:: nosetests --with-cov --cov-report term-missing --cov myproj tests/ ---------- coverage: platform linux2, python 2.6.5-final-0 ----------- Name Stmts Miss Cover Missing -------------------------------------------------- myproj/__init__ 2 0 100% myproj/myproj 257 13 95% 24-26, 99, 149, 233-236, 297-298, 369-370 myproj/feature4286 94 9 90% 37, 40, 183-188, 197 -------------------------------------------------- TOTAL 353 22 94% ---------------------------------------------------------------------- The remaining three reports output to files without showing anything on the terminal (useful for when the output is going to a continuous integration server):: nosetests --with-cov --cov-report html --cov-report xml --cov-report annotate --cov myproj tests/ Coverage Data File ------------------ The data file is erased at the beginning of testing to ensure clean data for each test run. The data file is left at the end of testing so that it is possible to use normal coverage tools to examine it. Coverage Config File -------------------- This plugin provides a clean minimal set of command line options that are added to nosetests. For further control of coverage use a coverage config file. For example if tests are contained within the directory tree being measured the tests may be excluded if desired by using a .coveragerc file with the omit option set:: nosetests --cov-config .coveragerc --cov myproj myproj/tests/ Where the .coveragerc file contains file globs:: [run] omit = tests/* For full details refer to the `coverage config file`_ documentation. .. _`coverage config file`: http://nedbatchelder.com/code/coverage/config.html Note that this plugin controls some options and setting the option in the config file will have no effect. These include specifying source to be measured (source option) and all data file handling (data_file and parallel options). Limitations ----------- For subprocess measurement environment variables must make it from the main process to the subprocess. The python used by the subprocess must have nose-cov installed. The subprocess must do normal site initialisation so that the environment variables can be detected and coverage started. Nose Multiprocess Plugin ------------------------ The nose cov plugin partially works with the nose multiprocess plugin. The nose multiprocess plugin does not join with its child processes so nose cov plugin has coverage measured but can't merge coverage results and report them. Work around by using cov plugin and multiprocess plugin together to run tests, note coverage report from this command will be incorrect:: nosetests --with-cov --processes=4 tests/ After there will be coverage data files for the main nose process and each subprocess:: .coverage .coverage.hostname.7323.198266 .coverage.hostname.7339.177156 .coverage.hostname.7358.543616 .coverage.hostname.7393.997428 Tell coverage to merge coverage results into one coverage data file:: coverage combine Tell coverage to report:: coverage report Acknowledgements ---------------- Whilst this plugin has been built fresh from the ground up it has been influenced by the work done on pytest-coverage (Ross Lawley, James Mills, Holger Krekel) and nose-cover (Jason Pellerin) which are other coverage plugins. Ned Batchelder for coverage and its ability to combine the coverage results of parallel runs. Holger Krekel for pytest with its distributed testing support. Jason Pellerin for nose. Michael Foord for unittest2. No doubt others have contributed to these tools as well. Keywords: nose nosetest cover coverage Platform: UNKNOWN Classifier: Development Status :: 4 - Beta Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2.4 Classifier: Programming Language :: Python :: 2.5 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3.0 Classifier: Programming Language :: Python :: 3.1 Classifier: Topic :: Software Development :: Testing nose-cov-1.6/nose_cov.egg-info/SOURCES.txt0000664000175000017500000000043012020324757021441 0ustar dpowelldpowell00000000000000LICENSE.txt MANIFEST.in README.txt nose_cov.py setup.py nose_cov.egg-info/PKG-INFO nose_cov.egg-info/SOURCES.txt nose_cov.egg-info/dependency_links.txt nose_cov.egg-info/entry_points.txt nose_cov.egg-info/not-zip-safe nose_cov.egg-info/requires.txt nose_cov.egg-info/top_level.txtnose-cov-1.6/nose_cov.egg-info/dependency_links.txt0000664000175000017500000000000112020324757023626 0ustar dpowelldpowell00000000000000 nose-cov-1.6/nose_cov.egg-info/requires.txt0000664000175000017500000000003212020324757022153 0ustar dpowelldpowell00000000000000nose>=0.11.4 cov-core>=1.6nose-cov-1.6/nose_cov.egg-info/not-zip-safe0000664000175000017500000000000112020317514021777 0ustar dpowelldpowell00000000000000 nose-cov-1.6/nose_cov.egg-info/entry_points.txt0000664000175000017500000000004312020324757023053 0ustar dpowelldpowell00000000000000[nose.plugins] cov = nose_cov:Cov nose-cov-1.6/MANIFEST.in0000644000175000017500000000011411420207733016000 0ustar dpowelldpowell00000000000000include README.txt include LICENSE.txt include setup.py include nose_cov.py