Merge lp:~cjwatson/launchpadlib/fix-cryptography-test-failure into lp:launchpadlib

Proposed by Colin Watson
Status: Merged
Merged at revision: 185
Proposed branch: lp:~cjwatson/launchpadlib/fix-cryptography-test-failure
Merge into: lp:launchpadlib
Diff against target: 12 lines (+2/-0)
1 file modified
src/launchpadlib/tests/test_launchpad.py (+2/-0)
To merge this branch: bzr merge lp:~cjwatson/launchpadlib/fix-cryptography-test-failure
Reviewer Review Type Date Requested Status
Cristian Gonzalez (community) Approve
Review via email: mp+408479@code.launchpad.net

Commit message

Fix a test failure on Python 3.5.

Description of the change

There's now an extra deprecation warning related to the `cryptography` package, which we must ignore in a test that counts warnings.

To post a comment you must log in.
Revision history for this message
Cristian Gonzalez (cristiangsp) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/launchpadlib/tests/test_launchpad.py'
--- src/launchpadlib/tests/test_launchpad.py 2020-04-19 09:28:47 +0000
+++ src/launchpadlib/tests/test_launchpad.py 2021-09-13 09:52:35 +0000
@@ -596,6 +596,8 @@
596 with warnings.catch_warnings(record=True) as caught:596 with warnings.catch_warnings(record=True) as caught:
597 warnings.simplefilter("always")597 warnings.simplefilter("always")
598 warnings.simplefilter("ignore", PendingDeprecationWarning)598 warnings.simplefilter("ignore", PendingDeprecationWarning)
599 warnings.filterwarnings(
600 "ignore", r".*next release of cryptography")
599 NoNetworkLaunchpad.get_token_and_login('consumer')601 NoNetworkLaunchpad.get_token_and_login('consumer')
600 self.assertEqual(len(caught), 1)602 self.assertEqual(len(caught), 1)
601 self.assertEqual(caught[0].category, DeprecationWarning)603 self.assertEqual(caught[0].category, DeprecationWarning)

Subscribers

People subscribed via source and target branches