Skip to content

Commit

Permalink
improve test isolation
Browse files Browse the repository at this point in the history
  • Loading branch information
gyst committed Jul 10, 2015
1 parent da3d98d commit e8d1ccc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/plone/app/theming/tests/test_policy.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
import time
import multiprocessing
import threading
import transaction
import unittest2 as unittest
Expand All @@ -16,10 +15,16 @@ class TestFunctional(unittest.TestCase):

layer = THEMING_FUNCTIONAL_TESTING

def setUp(self):
request = self.layer['request']
policy = theming_policy(request)
# avoid cache pollution from other tests
policy.invalidateCache()

def tearDown(self):
request = self.layer['request']
policy = theming_policy(request)
# static class attribute is cached across test runs
# clear local thread caches
policy.invalidateCache()

def test_getSettings(self):
Expand Down

0 comments on commit e8d1ccc

Please sign in to comment.