From bcb64054edaa7cf636bd38b8ab0259f6fb93f3f9 Mon Sep 17 00:00:00 2001 From: Matt Clay Date: Fri, 7 May 2021 17:26:41 -0700 Subject: [PATCH] Another unit test fix for Python 3.10. (#74628) * Another unit test fix for Python 3.10. * Add missing __init__.py file. --- test/units/_vendor/__init__.py | 0 test/units/_vendor/test_vendor.py | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 test/units/_vendor/__init__.py diff --git a/test/units/_vendor/__init__.py b/test/units/_vendor/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/units/_vendor/test_vendor.py b/test/units/_vendor/test_vendor.py index 6a0fa38551d..fa9fdb25738 100644 --- a/test/units/_vendor/test_vendor.py +++ b/test/units/_vendor/test_vendor.py @@ -62,4 +62,4 @@ def test_vendored_conflict(): import pkgutil import sys test_vendored(vendored_pkg_names=['sys', 'pkgutil']) # pass a real package we know is already loaded - assert 'pkgutil, sys' in str(w[0].message) # ensure both conflicting modules are listed and sorted + assert any('pkgutil, sys' in str(msg.message) for msg in w) # ensure both conflicting modules are listed and sorted