fix assertion introspection on python 3.2+

This commit is contained in:
Benjamin Peterson 2011-06-03 16:51:49 -05:00
parent ce1b456762
commit 43de6c270f
1 changed files with 2 additions and 2 deletions

View File

@ -68,8 +68,8 @@ def pytest_configure(config):
def _write_pyc(co, source_path):
if hasattr(imp, "cache_from_source"):
# Handle PEP 3147 pycs.
pyc = py.path(imp.cache_from_source(source_math))
pyc.dirname.ensure(dir=True)
pyc = py.path.local(imp.cache_from_source(str(source_path)))
pyc.ensure()
else:
pyc = source_path + "c"
mtime = int(source_path.mtime())