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

Merge pull request #281313 from fabaff/asn1tools-fix

python311Packages.asn1tools: disable failing tests
parents dde89aa5 ed829b9e
Loading
Loading
Loading
Loading
+19 −7
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, bitstruct
, buildPythonPackage
, diskcache
, fetchFromGitHub
, prompt-toolkit
, pyparsing
, python
, pythonOlder
, pytest-xdist
, pytestCheckHook
, pythonOlder
, setuptools
}:

buildPythonPackage rec {
  pname = "asn1tools";
  version = "0.166.0";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "eerimoq";
    repo = "asn1tools";
    rev = version;
    rev = "refs/tags/${version}";
    hash = "sha256-TWAOML6nsLX3TYqoQ9fcSjrUmC4byXOfczfkmSaSa0k=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  propagatedBuildInputs = [
    bitstruct
    pyparsing
@@ -39,17 +44,24 @@ buildPythonPackage rec {
  };

  nativeCheckInputs = [
    pytest-xdist
    pytestCheckHook
  ] ++ lib.flatten (builtins.attrValues passthru.optional-depdendencies);


  pythonImportsCheck = [
    "asn1tools"
  ];

  disabledTests = [
    # assert exact error message of pyparsing which changed and no longer matches
    # https://github.com/eerimoq/asn1tools/issues/167
    "test_parse_error"
  ];

  meta = with lib; {
    description = "ASN.1 parsing, encoding and decoding";
    homepage = "https://github.com/eerimoq/asn1tools";
    changelog = "https://github.com/eerimoq/asn1tools/releases/tag/${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };