diff --git a/.gitignore b/.gitignore index be58414..236fa80 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /pytest-cov-2.1.0.tar.gz /pytest-cov-2.2.0.tar.gz /pytest-cov-2.2.1.tar.gz +/pytest-cov-2.3.0.tar.gz diff --git a/python-pytest-cov-xdist.patch b/python-pytest-cov-xdist.patch deleted file mode 100644 index a607d11..0000000 --- a/python-pytest-cov-xdist.patch +++ /dev/null @@ -1,126 +0,0 @@ -diff -up pytest-cov-2.2.0/tests/test_pytest_cov.py.xdist pytest-cov-2.2.0/tests/test_pytest_cov.py ---- pytest-cov-2.2.0/tests/test_pytest_cov.py.xdist 2015-10-03 07:33:53.000000000 -0600 -+++ pytest-cov-2.2.0/tests/test_pytest_cov.py 2015-10-05 09:07:26.548035911 -0600 -@@ -124,6 +124,12 @@ def test_run_target(): - p.join() - ''' - -+try: -+ import xdist -+ HAS_XDIST = True -+except: -+ HAS_XDIST = False -+ - SCRIPT_FAIL = ''' - def test_fail(): - assert False -@@ -135,7 +141,11 @@ SCRIPT2_RESULT = '3 * 100%' - CHILD_SCRIPT_RESULT = '[56] * 100%' - PARENT_SCRIPT_RESULT = '8 * 100%' - --xdist = pytest.mark.parametrize('opts', ['', '-n 1'], ids=['nodist', 'xdist']) -+try: -+ import xdist -+ xdist = pytest.mark.parametrize('opts', ['', '-n 1'], ids=['nodist', 'xdist']) -+except: -+ xdist = pytest.mark.parametrize('opts', [''], ids=['nodist']) - - - def test_central(testdir): -@@ -291,6 +301,7 @@ show_missing = true - assert result.ret == 0 - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_no_cov_on_fail(testdir): - script = testdir.makepyfile(SCRIPT_FAIL) - -@@ -304,6 +315,7 @@ def test_no_cov_on_fail(testdir): - result.stdout.fnmatch_lines(['*1 failed*']) - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_combine_racecondition(testdir): - script = testdir.makepyfile(""" - import pytest -@@ -330,6 +342,7 @@ def test_foo(foo): - assert result.ret == 0 - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_collocated(testdir): - script = testdir.makepyfile(SCRIPT) - -@@ -349,6 +362,7 @@ def test_dist_collocated(testdir): - assert result.ret == 0 - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_not_collocated(testdir): - script = testdir.makepyfile(SCRIPT) - dir1 = testdir.mkdir('dir1') -@@ -438,6 +452,7 @@ omit = - assert result.ret == 0 - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_subprocess_collocated(testdir): - scripts = testdir.makepyfile(parent_script=SCRIPT_PARENT, - child_script=SCRIPT_CHILD) -@@ -459,6 +474,7 @@ def test_dist_subprocess_collocated(test - assert result.ret == 0 - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_subprocess_not_collocated(testdir, tmpdir): - scripts = testdir.makepyfile(parent_script=SCRIPT_PARENT, - child_script=SCRIPT_CHILD) -@@ -504,6 +520,7 @@ def test_empty_report(testdir): - assert not matching_lines - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_dist_missing_data(testdir): - venv_path = os.path.join(str(testdir.tmpdir), 'venv') - virtualenv.create_environment(venv_path) -@@ -616,6 +633,7 @@ def test_cover_conftest(testdir): - result.stdout.fnmatch_lines([CONF_RESULT]) - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_cover_looponfail(testdir, monkeypatch): - testdir.makepyfile(mod=MODULE) - testdir.makeconftest(CONFTEST) -@@ -634,6 +652,7 @@ def test_cover_looponfail(testdir, monke - ) - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_cover_conftest_dist(testdir): - testdir.makepyfile(mod=MODULE) - testdir.makeconftest(CONFTEST) -@@ -683,6 +702,7 @@ def test_coveragerc(testdir): - result.stdout.fnmatch_lines(['test_coveragerc* %s' % EXCLUDED_RESULT]) - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_coveragerc_dist(testdir): - testdir.makefile('', coveragerc=COVERAGERC) - script = testdir.makepyfile(EXCLUDED_TEST) -@@ -729,7 +749,7 @@ def test_foo(): - SCRIPT_SIMPLE_RESULT = '4 * 100%' - - --@pytest.mark.skipif('sys.platform == "win32"') -+@pytest.mark.skipif('sys.platform == "win32" or not HAS_XDIST') - def test_dist_boxed(testdir): - script = testdir.makepyfile(SCRIPT_SIMPLE) - -@@ -805,6 +825,7 @@ data_file = %s - assert glob.glob(str(testdir.tmpdir.join('some/special/place/coverage-data*'))) - - -+@pytest.mark.skipif("not HAS_XDIST") - def test_external_data_file_xdist(testdir): - script = testdir.makepyfile(SCRIPT) - testdir.tmpdir.join('.coveragerc').write(""" diff --git a/python-pytest-cov.spec b/python-pytest-cov.spec index 25cd3db..746be9a 100644 --- a/python-pytest-cov.spec +++ b/python-pytest-cov.spec @@ -9,15 +9,13 @@ %global srcname pytest-cov Name: python-%{srcname} -Version: 2.2.1 +Version: 2.3.0 Release: 1%{?dist} Summary: Pytest plugin for coverage reporting License: MIT URL: https://pypi.python.org/pypi/%{srcname} -Source0: https://pypi.python.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz -# Skip xdist tests, not yet packaged -Patch0: python-pytest-cov-xdist.patch +Source0: https://github.com/pytest-dev/%{srcname}/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz BuildArch: noarch @@ -58,7 +56,6 @@ distributed testing, including subprocesses and multiprocessing for Python 3. %prep %setup -q -n %{srcname}-%{version} -%patch0 -p1 -b .xdist rm -rf *.egg-info @@ -99,6 +96,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:$PWD/tests py.test-%{python3_version} %changelog +* Thu Jul 7 2016 Orion Poplawski - 2.3.0-1 +- Update to 2.3.0 + * Mon May 23 2016 Orion Poplawski - 2.2.1-1 - Ignore failing tests diff --git a/sources b/sources index 9912444..d9db806 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d4c65c5561343e6c6a583d5fd29e6a63 pytest-cov-2.2.1.tar.gz +0429d1a8fbecb23f8f128b2f413cf3ca pytest-cov-2.3.0.tar.gz