Skip to content

Commit

Permalink
Fixed test_precompiler_cache to clear cache before the test runs (dja…
Browse files Browse the repository at this point in the history
  • Loading branch information
cuu508 committed Nov 22, 2021
1 parent d697fba commit d4be504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compressor/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ def test_precompiler_output_unicode(self):
self.assertEqual(type(compiler.input()), str)

def test_precompiler_cache(self):
# The cache may already have data in it depending on the order the tests are
# run, so start by clearing it:
cache.clear()
command = '%s %s -f {infile} -o {outfile}' % (sys.executable, self.test_precompiler)
compiler = CachedCompilerFilter(command=command, **self.cached_precompiler_args)
self.assertEqual("body { color:#990; }", compiler.input())
Expand Down

0 comments on commit d4be504

Please sign in to comment.