diff --git a/.coveragerc b/.coveragerc index 5942e71c6b6..f11b16823f4 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,11 +1,5 @@ [run] -include = - src/* - testing/* - .tox/*/lib/python*/site-packages/_pytest/* - .tox/*/lib/python*/site-packages/pytest.py - .tox\*\Lib\site-packages\_pytest\* - .tox\*\Lib\site-packages\pytest.py +source = . parallel = 1 branch = 1 diff --git a/.travis.yml b/.travis.yml index 624dc2f4caa..79fb42a0b93 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,33 +18,6 @@ matrix: jobs: include: - # Coverage for: - # - pytester's LsofFdLeakChecker (can be done with lsof factor later). - - env: TOXENV=py27 PYTEST_COVERAGE=1 - python: '2.7' - # Specialized factors for py37. - # NOTE: does not appear to cover src/_pytest/debugging.py?! - # - env: TOXENV=py37-pexpect,py37-trial PYTEST_COVERAGE=1 - - &test-macos - # NOTE: (tests with) pexpect appear to be buggy on Travis, - # at least with coverage. - # Log: https://travis-ci.org/pytest-dev/pytest/jobs/500358864 - os: osx - osx_image: xcode10.1 - language: generic - env: TOXENV=py37-xdist PYTEST_COVERAGE=1 - before_install: - - which python3 - - python3 -V - - ln -sfn "$(which python3)" /usr/local/bin/python - - python -V - - test $(python -c 'import sys; print("%d%d" % sys.version_info[0:2])') = 37 - - - env: TOXENV=linting,docs,doctesting PYTEST_COVERAGE=1 - # Coverage for: - # - TestArgComplete - - env: TOXENV=py37-numpy-xdist PYTEST_COVERAGE=1 - - env: TOXENV=py27-pexpect PYTEST_COVERAGE=1 python: 2.7 @@ -86,8 +59,8 @@ after_success: # Add last TOXENV to $PATH. PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" coverage combine - coverage xml - coverage report -m + coverage xml -i + coverage report -m -i bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -n $TOXENV fi diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index c81905c1f01..00000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,97 +0,0 @@ -trigger: -- master -- features - -variables: - PYTEST_ADDOPTS: "--junitxml=build/test-results/$(tox.env).xml" - python.needs_vc: False - python.exe: "python" - COVERAGE_FILE: "$(Build.Repository.LocalPath)/.coverage" - COVERAGE_PROCESS_START: "$(Build.Repository.LocalPath)/.coveragerc" - PYTEST_COVERAGE: '0' - -jobs: - -- job: 'Test' - pool: - vmImage: "vs2017-win2016" - strategy: - matrix: - py27-nobyte-numpy-xdist: - python.version: '2.7' - tox.env: 'py27-nobyte-numpy-xdist' - # Coverage for: - # - test_supports_breakpoint_module_global - # - test_terminal_reporter_writer_attr (without xdist) - # - "if write" branch in _pytest.assertion.rewrite - # - also for more stable(?) isatty in _pytest.terminal - # (according to https://codecov.io/gh/pytest-dev/pytest/pull/4858/src/src/_pytest/terminal.py). - PYTEST_COVERAGE: '1' - py34-xdist: - python.version: '3.4' - tox.env: 'py34-xdist' - # Coverage for: - # - _pytest.compat._bytes_to_ascii - PYTEST_COVERAGE: '1' - py35-xdist: - python.version: '3.5' - tox.env: 'py35-xdist' - # Coverage for: - # - test_supports_breakpoint_module_global - PYTEST_COVERAGE: '1' - py36-xdist: - python.version: '3.6' - tox.env: 'py36-xdist' - # Coverage for: - # - _py36_windowsconsoleio_workaround (could also be py36+) - PYTEST_COVERAGE: '1' - maxParallel: 10 - - steps: - - task: UsePythonVersion@0 - condition: not(startsWith(variables['python.exe'], 'pypy')) - inputs: - versionSpec: '$(python.version)' - architecture: 'x64' - - - script: choco install vcpython27 - condition: eq(variables['python.needs_vc'], True) - displayName: 'Install VC for py27' - - - script: choco install python.pypy - condition: eq(variables['python.exe'], 'pypy') - displayName: 'Install pypy' - - - script: choco install pypy3 - condition: eq(variables['python.exe'], 'pypy3') - displayName: 'Install pypy3' - - - task: PowerShell@2 - inputs: - targetType: 'inline' - script: | - Invoke-WebRequest -Uri "https://bootstrap.pypa.io/get-pip.py" -OutFile "get-pip.py" - $(python.exe) get-pip.py - condition: startsWith(variables['python.exe'], 'pypy') - displayName: 'Install pip' - - - script: $(python.exe) -m pip install --upgrade pip && $(python.exe) -m pip install tox - displayName: 'Install tox' - - - script: | - call scripts/setup-coverage-vars.bat || goto :eof - $(python.exe) -m tox -e $(tox.env) - displayName: 'Run tests' - - - task: PublishTestResults@2 - inputs: - testResultsFiles: 'build/test-results/$(tox.env).xml' - testRunTitle: '$(tox.env)' - condition: succeededOrFailed() - - - script: call scripts\upload-coverage.bat - displayName: 'Upload coverage' - condition: eq(variables['PYTEST_COVERAGE'], '1') - env: - CODECOV_TOKEN: $(CODECOV_TOKEN) - PYTEST_CODECOV_NAME: $(tox.env)