- fix a flaky test on py35-xdist by calling

importlib.invalidate_caches()

- bump version to 2.8.1

- regen docs

- amend changelog, authors
This commit is contained in:
holger krekel
2015-09-29 13:10:59 +02:00
parent f61f39efdd
commit 95245b935c
20 changed files with 91 additions and 73 deletions

View File

@@ -534,6 +534,20 @@ class Testdir:
if path is None:
path = self.tmpdir
sys.path.insert(0, str(path))
# a call to syspathinsert() usually means that the caller
# wants to import some dynamically created files.
# with python3 we thus invalidate import caches.
self._possibly_invalidate_import_caches()
def _possibly_invalidate_import_caches(self):
# invalidate caches if we can (py33 and above)
try:
import importlib
except ImportError:
pass
else:
if hasattr(importlib, "invalidate_caches"):
importlib.invalidate_caches()
def mkdir(self, name):
"""Create a new (sub)directory."""