fix assertion introspection on python 3.2+
This commit is contained in:
parent
ce1b456762
commit
43de6c270f
|
@ -68,8 +68,8 @@ def pytest_configure(config):
|
||||||
def _write_pyc(co, source_path):
|
def _write_pyc(co, source_path):
|
||||||
if hasattr(imp, "cache_from_source"):
|
if hasattr(imp, "cache_from_source"):
|
||||||
# Handle PEP 3147 pycs.
|
# Handle PEP 3147 pycs.
|
||||||
pyc = py.path(imp.cache_from_source(source_math))
|
pyc = py.path.local(imp.cache_from_source(str(source_path)))
|
||||||
pyc.dirname.ensure(dir=True)
|
pyc.ensure()
|
||||||
else:
|
else:
|
||||||
pyc = source_path + "c"
|
pyc = source_path + "c"
|
||||||
mtime = int(source_path.mtime())
|
mtime = int(source_path.mtime())
|
||||||
|
|
Loading…
Reference in New Issue