diff --git a/CHANGELOG.md b/CHANGELOG.md index 8774c94..2bf486c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.4.2 # + +- Proper fix for #25, the fix made in `0.4.1` was incorrect. + # 0.4.1 # - Fix error that may happen during collection when using xdist (#25). diff --git a/pytest_cpp/plugin.py b/pytest_cpp/plugin.py index 6243ad4..9651387 100644 --- a/pytest_cpp/plugin.py +++ b/pytest_cpp/plugin.py @@ -17,7 +17,7 @@ def pytest_collect_file(parent, path): is_executable = os.stat(str(path)).st_mode & stat.S_IXUSR except OSError: # in some situations the file might not be available anymore at this point - return False + is_executable = False if not is_executable: return masks = parent.config.getini('cpp_files') or DEFAULT_MASKS diff --git a/setup.py b/setup.py index b46ad18..dd5d79b 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="pytest-cpp", - version='0.4.1', + version='0.4.2', packages=['pytest_cpp'], entry_points={ 'pytest11': ['cpp = pytest_cpp.plugin'], diff --git a/tests/test_pytest_cpp.py b/tests/test_pytest_cpp.py index 8c15939..dab3040 100644 --- a/tests/test_pytest_cpp.py +++ b/tests/test_pytest_cpp.py @@ -254,7 +254,7 @@ def test_race_condition_on_collect(tmpdir): '/../test_duplicate_filenames.cpython-27-PYTEST.pyc.21746' """ import pytest_cpp.plugin - assert not pytest_cpp.plugin.pytest_collect_file(None, tmpdir / 'invalid-file') + assert pytest_cpp.plugin.pytest_collect_file(None, tmpdir / 'invalid-file') is None class TestError: