-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an option to run tests without code coverage.
- Loading branch information
Omer Katz
committed
Jan 26, 2013
1 parent
0721a55
commit 39668b7
Showing
7 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
build | ||
dist | ||
*.egg-info | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
from coverage import coverage | ||
from django.core.management import BaseCommand | ||
|
||
class Command(BaseCommand): | ||
def handle(self, filename, **options): | ||
cov = coverage(data_file=filename) | ||
|
||
cov.erase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from optparse import make_option | ||
from django.core.management import CommandError | ||
|
||
try: | ||
# Depends on a change that will be made on discover runner. | ||
# It can work without it at the time being and therefor the try...except block exists. | ||
# Also, even if there was no expected change, it is useful as a foresight. | ||
from discover_runner.management.commands.test import Command as TestCommand | ||
except ImportError: | ||
from django.core.management.commands.test import Command as TestCommand | ||
|
||
class Command(TestCommand): | ||
option_list = TestCommand.option_list + ( | ||
make_option('--no-coverage', | ||
action='store_false', dest='perform_coverage', default=True, | ||
help='Specifies that no code coverage will be performed.'), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters