Unverified Commit 954259d0 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

various: migrate to pytest-cov-stub (#510057)

parents 883b95bc f0f6a526
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -7,6 +7,7 @@
  setuptools,
  webob,
  pytestCheckHook,
  pytest-cov-stub,
}:

buildPythonPackage rec {
@@ -21,11 +22,6 @@ buildPythonPackage rec {
    hash = "sha256-WXBdlgUoWdptv1weJf82qyH8TTqNCC1rYFEa972TqDY=";
  };

  postPatch = ''
    substituteInPlace tox.ini --replace-fail \
      "--cov=bugsnag --cov-report html --cov-append --cov-report term" ""
  '';

  build-system = [ setuptools ];

  dependencies = [ webob ];
@@ -39,7 +35,10 @@ buildPythonPackage rec {

  pythonImportsCheck = [ "bugsnag" ];

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

  disabledTestPaths = [
    # Extra dependencies
+2 −5
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  fetchpatch,
  poetry-core,
  pytestCheckHook,
  pytest-cov-stub,
  requests,
  requests-mock,
}:
@@ -32,6 +33,7 @@ buildPythonPackage rec {
  nativeCheckInputs = [
    requests-mock
    pytestCheckHook
    pytest-cov-stub
  ];

  patches = [
@@ -43,11 +45,6 @@ buildPythonPackage rec {
    })
  ];

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace 'pytest-cov = "^2.8.1"' ""
  '';

  pythonImportsCheck = [ "openevsewifi" ];

  meta = {
+2 −2
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@
  click,

  pytest,
  pytest-cov,
  pytest-cov-stub,
  mock,
  requests-mock,
  tox,
@@ -42,7 +42,7 @@ buildPythonPackage rec {

  nativeCheckInputs = [
    pytest
    pytest-cov
    pytest-cov-stub
    mock
    requests-mock
    tox
+2 −5
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@
  mypy,
  poetry-core,
  pytest-aio,
  pytest-cov-stub,
  pytest-mypy,
  pytest-mypy-plugins,
  pytestCheckHook,
@@ -28,11 +29,6 @@ buildPythonPackage rec {
    hash = "sha256-VQzsa/uNTQVND0kc20d25to/6LELEiS3cqvG7a1kDw4=";
  };

  postPatch = ''
    sed -i setup.cfg \
      -e '/--cov.*/d'
  '';

  nativeBuildInputs = [ poetry-core ];

  propagatedBuildInputs = [ typing-extensions ];
@@ -45,6 +41,7 @@ buildPythonPackage rec {
    mypy
    pytestCheckHook
    pytest-aio
    pytest-cov-stub
    pytest-mypy
    pytest-mypy-plugins
    setuptools
+2 −5
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@

  # tests
  pytestCheckHook,
  pytest-cov-stub,
  webtest,
}:

@@ -23,11 +24,6 @@ buildPythonPackage rec {
    hash = "sha256-uFgv+57/UZs4KoOdkFxbvTEDQrJbb0iYJ5JoWWN4yFY=";
  };

  postPatch = ''
    substituteInPlace setup.py \
      --replace ", 'pytest-cov'" ""
  '';

  optional-dependencies = {
    KidMagic = [
      # TODO: kid
@@ -39,6 +35,7 @@ buildPythonPackage rec {

  nativeCheckInputs = [
    pytestCheckHook
    pytest-cov-stub
    webtest
  ]
  ++ lib.concatAttrValues optional-dependencies;