diff --git a/CHANGELOG b/CHANGELOG index 647ee5372..52ebc80ce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,8 @@ Changes between 2.3.4 and 2.3.5dev ----------------------------------- +- issue 280 - disable assertion rewriting on buggy CPython 2.6.0 + - inject "getfixture()" helper to retrieve fixtures from doctests, thanks Andreas Zeidler diff --git a/_pytest/assertion/__init__.py b/_pytest/assertion/__init__.py index b7ec1924d..bd3b594fd 100644 --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -39,7 +39,10 @@ def pytest_configure(config): except ImportError: mode = "reinterp" else: - if sys.platform.startswith('java'): + # Both Jython and CPython 2.6.0 have AST bugs that make the + # assertion rewriting hook malfunction. + if (sys.platform.startswith('java') or + sys.version_info[:3] == (2, 6, 0)): mode = "reinterp" if mode != "plain": _load_modules(mode)