diff --git a/CHANGELOG b/CHANGELOG index 7701d5146..4cb5ccf8e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,9 @@ Changes between 2.3.1 and 2.3.2.dev - fix exception message check of test_nose.py to pass on python33 as well +- fix issue206 - fix test_assertrewrite.py to work when a global + PYTHONDONTWRITEBYTECODE=1 is present + - add tox.ini to pytest distribution so that ignore-dirs and others config bits are properly distributed for maintainers who run pytest-own tests diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 06d98c3a3..cad6f4d5e 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.3.2.dev4' +__version__ = '2.3.2.dev5' diff --git a/setup.py b/setup.py index 593cfba23..fcc9f6fab 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.3.2.dev4', + version='2.3.2.dev5', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff --git a/testing/test_assertrewrite.py b/testing/test_assertrewrite.py index 8d4e400f7..d421d2101 100644 --- a/testing/test_assertrewrite.py +++ b/testing/test_assertrewrite.py @@ -354,18 +354,21 @@ def test_no_bytecode(): @pytest.mark.skipif('"__pypy__" in sys.modules') def test_pyc_vs_pyo(self, testdir, monkeypatch): testdir.makepyfile(""" -import pytest -def test_optimized(): - "hello" - assert test_optimized.__doc__ is None""") + import pytest + def test_optimized(): + "hello" + assert test_optimized.__doc__ is None""" + ) p = py.path.local.make_numbered_dir(prefix="runpytest-", keep=None, rootdir=testdir.tmpdir) tmp = "--basetemp=%s" % p monkeypatch.setenv("PYTHONOPTIMIZE", "2") + monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False) assert testdir.runpybin("py.test", tmp).ret == 0 tagged = "test_pyc_vs_pyo." + PYTEST_TAG assert tagged + ".pyo" in os.listdir("__pycache__") monkeypatch.undo() + monkeypatch.delenv("PYTHONDONTWRITEBYTECODE", raising=False) assert testdir.runpybin("py.test", tmp).ret == 1 assert tagged + ".pyc" in os.listdir("__pycache__") diff --git a/tox.ini b/tox.ini index 9c9fdb8a9..00b38f76b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] distshare={homedir}/.tox/distshare -envlist=py26,py27,py31,py32,py33,py27-xdist,py25,trial +envlist=py26,py27,py27-nobyte,py31,py32,py33,py27-xdist,py25,trial indexserver= pypi = http://pypi.python.org/simple testrun = http://pypi.testrun.org @@ -24,7 +24,17 @@ basepython=python2.7 deps=pytest-xdist commands= py.test -n3 -rfsxX \ - --ignore .tox --junitxml={envlogdir}/junit-{envname}.xml testing + --junitxml={envlogdir}/junit-{envname}.xml testing + +[testenv:py27-nobyte] +changedir=. +basepython=python2.7 +deps=pytest-xdist +setenv= + PYTHONDONTWRITEBYTECODE=1 +commands= + py.test -n3 -rfsxX \ + --junitxml={envlogdir}/junit-{envname}.xml [] [testenv:trial] changedir=.