Unverified Commit c221bb54 authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

Merge pull request #288412 from SuperSandro2000/aws-sam-translator

python312Packages.aws-sam-translator: don't fail when pytest/pluggy, skip slow tests
parents de1f95f6 eb2be110
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -29,8 +29,8 @@ buildPythonPackage rec {
  };

  postPatch = ''
    substituteInPlace pytest.ini \
      --replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
    # don't try to use --cov or fail on new warnings
    rm pytest.ini
  '';

  propagatedBuildInputs = [
@@ -49,14 +49,15 @@ buildPythonPackage rec {
    pyyaml
  ];

  pythonImportsCheck = [
    "samtranslator"
  ];

  preCheck = ''
    sed -i '2ienv =\n\tAWS_DEFAULT_REGION=us-east-1' pytest.ini
    export AWS_DEFAULT_REGION=us-east-1
  '';

  pytestFlagsArray = [
    "tests"
    ''-m "not slow"''
  ];

  disabledTests = [
    # urllib3 2.0 compat
    "test_plugin_accepts_different_sar_client"
@@ -79,6 +80,10 @@ buildPythonPackage rec {

  __darwinAllowLocalNetworking = true;

  pythonImportsCheck = [
    "samtranslator"
  ];

  meta = with lib; {
    description = "Python library to transform SAM templates into AWS CloudFormation templates";
    homepage = "https://github.com/aws/serverless-application-model";