Skip to content

Commit

Permalink
Added second test to test default for coverage=true
Browse files Browse the repository at this point in the history
  • Loading branch information
reinout committed Jun 29, 2016
1 parent 1977df1 commit a1f459b
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/djangorecipe/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def test_relative_paths_default(self):
self.assertFalse(expected in open(manage).read())
self.assertFalse(expected in open(wsgi_script).read())

def test_coverage_default(self):
def test_coverage_emty(self):
recipe_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
testrunner = os.path.join(self.bin_dir, 'test')
Expand All @@ -353,6 +353,19 @@ def test_coverage_default(self):
self.recipe.create_test_runner([recipe_dir], [])
self.assertTrue("', '', '" in open(testrunner).read())

def test_coverage_default(self):
self.recipe.options['coverage'] = 'true'
recipe_dir = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..'))
testrunner = os.path.join(self.bin_dir, 'test')

# When we specify an app to test it should create the the
# testrunner
self.recipe.options['test'] = 'knight'
self.recipe.create_test_runner([recipe_dir], [])
self.assertTrue("', 'report html_report xml_report', '"
in open(testrunner).read())

def test_relative_paths_true(self):
recipe = Recipe(
{'buildout': {
Expand Down

0 comments on commit a1f459b

Please sign in to comment.