From 43de6c270f885a9cd4f95eafdaad8e4ffb8543f6 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Fri, 3 Jun 2011 16:51:49 -0500 Subject: [PATCH] fix assertion introspection on python 3.2+ --- _pytest/assertion/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_pytest/assertion/__init__.py b/_pytest/assertion/__init__.py index 6daad05c4..e20e4e4b5 100644 --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -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())