aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
316 stars 158 forks source link

Pytest warning fix for contract test contract_update_without_create #971

Closed carpnick closed 1 year ago

carpnick commented 1 year ago

Issue #, if available:

Description of changes:

Fix warning below when running Contract tests

Pytest warning when running contract tests:

resource/handler_update_invalid.py::contract_update_without_create
  /opt/homebrew/lib/python3.10/site-packages/_pytest/python.py:199: PytestReturnNotNoneWarning: Expected None, but resource/handler_update_invalid.py::contract_update_without_create returned <HandlerErrorCode.NotFound: 'NotFound'>, which will be an error in a future version of pytest.  Did you mean to use `assert` instead of `return`?
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

mmaeng commented 1 year ago

Looks like there is a formatting/linting change that pre-commit wants to do. But LGTM with that update