sendgrid / python-http-client

Twilio SendGrid's Python HTTP Client for calling APIs
https://sendgrid.com
MIT License
126 stars 101 forks source link

Test failure with Python 3.10 #153

Closed fabaff closed 2 years ago

fabaff commented 2 years ago

Issue Summary

With Python 3.10 I see a test failure.

============================= test session starts ==============================
platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /build/source
collected 13 items                                                             

tests/test_daterange.py F                                                [  7%]
tests/test_repofiles.py .                                                [ 15%]
tests/test_unit.py ...........                                           [100%]

=================================== FAILURES ===================================
________________________ DateRangeTest.test__daterange _________________________

self = <tests.test_daterange.DateRangeTest testMethod=test__daterange>

    def test__daterange(self):
>       self.assertIn(self.pattern, self.license_file)
E       AssertionError: 'Copyright (C) 2022, Twilio SendGrid, Inc.' not found in 'MIT License\n\nCopyright (C) 2021, Twilio SendGrid, Inc. <help@twilio.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the "Software"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n'

tests/test_daterange.py:19: AssertionError
=========================== short test summary info ============================
FAILED tests/test_daterange.py::DateRangeTest::test__daterange - AssertionErr...
========================= 1 failed, 12 passed in 0.35s =========================

Steps to Reproduce

Run tests

Code Snippet

n/a

Exception/Log

n/a

Technical details:

fabaff commented 2 years ago

Related #152

JenniferMah commented 2 years ago

Hi @fabaff! Can you try updating to the latest version of the python-http-client (3.3.5)?

fabaff commented 2 years ago

@JenniferMah, thanks a lot. Tests are all passing (https://github.com/NixOS/nixpkgs/pull/154821).