Unverified Commit e6fe66b2 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

Merge pull request #331138 from pbsds/fix-pytest-cov-stub-migrations-1722359134

treewide: migrate to pytest-cov-stub 
parents 6f8aa1f1 01fc2fa2
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  fetchFromGitHub,
  fetchpatch,
  pytest-aiohttp,
  pytest-cov-stub,
  pytestCheckHook,
  pythonOlder,
  setuptools,
@@ -32,11 +33,6 @@ buildPythonPackage rec {
    })
  ];

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace "--cov=aiojobs/ --cov=tests/ --cov-report term" ""
  '';

  nativeBuildInputs = [ setuptools ];

  propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ async-timeout ];
@@ -48,6 +44,7 @@ buildPythonPackage rec {
  nativeCheckInputs = [
    pytestCheckHook
    pytest-aiohttp
    pytest-cov-stub
  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);

  pythonImportsCheck = [ "aiojobs" ];
+3 −2
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  yarl,
  aresponses,
  pytest-asyncio,
  pytest-cov-stub,
  pytestCheckHook,
}:

@@ -34,14 +35,14 @@ buildPythonPackage rec {
  nativeCheckInputs = [
    aresponses
    pytest-asyncio
    pytest-cov-stub
    pytestCheckHook
  ];

  postPatch = ''
    # Upstream doesn't set a version for the pyproject.toml
    substituteInPlace pyproject.toml \
      --replace "0.0.0" "${version}" \
      --replace "--cov" ""
      --replace "0.0.0" "${version}"
  '';

  pythonImportsCheck = [ "ambee" ];
+5 −6
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  pytest-cov-stub,
  pythonOlder,
}:

@@ -20,12 +21,10 @@ buildPythonPackage rec {
    sha256 = "0cssdcridadjzichz1vv1ng7jwphqkn8ihh83hpz9mcjmxyb94qc";
  };

  nativeCheckInputs = [ pytestCheckHook ];

  postPatch = ''
    substituteInPlace setup.cfg \
      --replace " --cov=anonip --cov-report=term-missing --no-cov-on-fail" ""
  '';
  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
  ];

  pytestFlagsArray = [ "tests.py" ];

+2 −5
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  jupyterhub,
  pythonOlder,
  pytest-asyncio,
  pytest-cov-stub,
  pytestCheckHook,
}:

@@ -35,13 +36,9 @@ buildPythonPackage rec {
    jupyterhub
  ];

  preCheck = ''
    substituteInPlace pyproject.toml \
      --replace-fail "--cov=batchspawner" ""
  '';

  nativeCheckInputs = [
    pytest-asyncio
    pytest-cov-stub
    pytestCheckHook
  ];

+2 −5
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  setuptools,
  strct,
  pytestCheckHook,
  pytest-cov-stub,
  pyyaml,
}:

@@ -31,11 +32,6 @@ buildPythonPackage rec {
  ];

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace-fail  \
        "--cov" \
        "#--cov"

    # configure correct version, which fails due to missing .git
    substituteInPlace versioneer.py birch/_version.py \
      --replace-fail '"0+unknown"' '"${version}"'
@@ -54,6 +50,7 @@ buildPythonPackage rec {

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    pyyaml
  ];

Loading