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