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

python310Packages.pytest-relaxed: add changelog to meta

- disable on unsupported Python releases
- re-enable tests
- no longer broken
parent fa2180a4
Loading
Loading
Loading
Loading
+28 −19
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, decorator
, fetchPypi
, invocations
, invoke
, pytest
, six
, decorator
, pytestCheckHook
, pythonOlder
}:

buildPythonPackage rec {
  version = "2.0.0";
  pname = "pytest-relaxed";
  version = "2.0.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-Szc8x1Rmb/YPVCWmnLQUZCwqEc56RsjOBmpzjkCSyjk=";
    hash = "sha256-Szc8x1Rmb/YPVCWmnLQUZCwqEc56RsjOBmpzjkCSyjk=";
  };

  # newer decorator versions are incompatible and cause the test suite to fail
  # but only a few utility functions are used from this package which means it has no actual impact on test execution in paramiko and Fabric
  postPatch = ''
    substituteInPlace setup.py \
      --replace "decorator>=4,<5" "decorator>=4" \
      --replace "pytest>=3,<5" "pytest>=3"
  '';
  buildInputs = [
    pytest
  ];

  buildInputs = [ pytest ];
  propagatedBuildInputs = [
    decorator
  ];

  propagatedBuildInputs = [ six decorator ];
  checkInputs = [
    invocations
    invoke
    pytestCheckHook
  ];

  checkInputs = [ pytestCheckHook ];
  pytestFlagsArray = [
    "tests"
  ];

  # lots of assertion errors mainly around decorator
  doCheck = false;
  pythonImportsCheck = [
    "pytest_relaxed"
  ];

  meta = with lib; {
    homepage = "https://pytest-relaxed.readthedocs.io/";
    description = "Relaxed test discovery/organization for pytest";
    changelog = "https://github.com/bitprophet/pytest-relaxed/blob/${version}/docs/changelog.rst";
    license = licenses.bsd0;
    maintainers = [ maintainers.costrouc ];
    # see https://github.com/bitprophet/pytest-relaxed/issues/12
    broken = true;
    maintainers = with maintainers; [ costrouc ];
  };
}