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
1=== modified file 'src/launchpadlib/tests/test_launchpad.py'
2--- src/launchpadlib/tests/test_launchpad.py 2020-04-19 09:28:47 +0000
3+++ src/launchpadlib/tests/test_launchpad.py 2021-09-13 09:52:35 +0000
4@@ -596,6 +596,8 @@
5 with warnings.catch_warnings(record=True) as caught:
6 warnings.simplefilter("always")
7 warnings.simplefilter("ignore", PendingDeprecationWarning)
8+ warnings.filterwarnings(
9+ "ignore", r".*next release of cryptography")
10 NoNetworkLaunchpad.get_token_and_login('consumer')
11 self.assertEqual(len(caught), 1)
12 self.assertEqual(caught[0].category, DeprecationWarning)

Subscribers

People subscribed via source and target branches