Commit a655b4d3 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

added 'include' & 'exclude' to test_coverage_command

parent e1d8b7ba
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ def coverage(modules, include=None, exclude=None, file=None):
			cover.report(list(modules), include=include, omit=exclude, file=file)


def test_coverage_command(superclass, packages=None):
def test_coverage_command(superclass, packages=None, include=None, exclude=None):
	"""
	Generate a distutils command class which is a subclass of 'superclass'.

@@ -98,6 +98,8 @@ def test_coverage_command(superclass, packages=None):
	'packages' should be a list of packages to generate the report for; it
	defaults to the value of 'packages' passed to setup().

	'include' and 'exclude' are as for coverage.coverage.report().

	Run 'python setup.py <command> --help' to see the added command line
	arguments.
	"""
@@ -131,6 +133,7 @@ def test_coverage_command(superclass, packages=None):
				return super(test, self).run()

			with coverage(packages or self.distribution.packages,
					include=include, exclude=exclude,
					file=self.coverage_report):
				super(test, self).run()