Skip to content

Commit

Permalink
Fixes Travis build.
Browse files Browse the repository at this point in the history
  • Loading branch information
BertrandBordage committed Jun 30, 2013
1 parent 57b0867 commit 30b8ed1
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions terms/tests/terms/__init__.py
Expand Up @@ -97,18 +97,17 @@ def testAdminRendering(self):
reverse('admin:terms_term_change', args=(term.pk,)))

def testPerformance(self):
self.maxDiff = 50000
self.assertHTMLEqual(
replace_terms(read_file('performance_test_before.html')),
read_file('performance_test_after.html'))

# Parsing & rebuilding should take less than 100 ms
# on this complex page, even if your computer is slow.
# Parsing & rebuilding should take less than 200 ms
# on this complex page, even if your computer is a bit slow.
# On my laptop it takes 42.6 ms.
self.assertLess(
timeit("replace_terms(test_page)",
setup='test_page = """%s"""\n'
'from terms.templatetags.terms import '
'replace_terms' % self.performance_test_page,
number=100) / 100.0,
0.1)
0.2)

0 comments on commit 30b8ed1

Please sign in to comment.