Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deprecation warnings: .format() -> .format_string(), .assertEqual… #49

Closed
wants to merge 1 commit into from
Closed

Fix deprecation warnings: .format() -> .format_string(), .assertEqual… #49

wants to merge 1 commit into from

Conversation

SeanMcAuliffe
Copy link

python -m pytest produced deprecation warnings concerning the use of the .format() and .assertEquals() methods. This PR replaces them with the suggested upgrades.

The results of the test suite after this change are below.

============================================================================================== test session starts ==============================================================================================
platform linux -- Python 3.9.2, pytest-7.1.1, pluggy-1.0.0
rootdir: /home/seanm/github/InvoiceGenerator
collected 42 items

tests/test_api.py ..................................                                                                                                                                                      [ 80%]
tests/test_generator.py ..                                                                                                                                                                                [ 85%]
tests/test_pdf.py ....                                                                                                                                                                                    [ 95%]
tests/test_pohoda.py ..                                                                                                                                                                                   [100%]

=============================================================================================== warnings summary ================================================================================================
InvoiceGenerator/conf.py:13: 1 warning
tests/test_generator.py: 12 warnings
tests/test_pdf.py: 100 warnings
  /home/seanm/github/InvoiceGenerator/InvoiceGenerator/conf.py:13: DeprecationWarning: parameter codeset is deprecated
    t = gettext.translation(

tests/test_generator.py::TestGenerator::test_gen
tests/test_pdf.py::TestBaseInvoice::test_generate
tests/test_pdf.py::TestBaseInvoice::test_generate
tests/test_pdf.py::TestBaseInvoice::test_generate_proforma
tests/test_pdf.py::TestBaseInvoice::test_generate_with_vat
  /home/seanm/github/InvoiceGenerator/InvoiceGenerator/pdf.py:105: DeprecationWarning: currency attribute is deprecated, use currency_locale instead
    warnings.warn("currency attribute is deprecated, use currency_locale instead", DeprecationWarning)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================================= 42 passed, 118 warnings in 0.51s ========================================================================================```

@D-Aldana D-Aldana deleted the fix_deprecation_warnings branch March 18, 2022 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant