File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,11 @@ async def test_cleanup_executors_on_client_del(self):
7777
7878 def resource_warning_caught ():
7979 for warning in w :
80- if isinstance (warning .message , ResourceWarning ):
80+ if (
81+ issubclass (warning .category , ResourceWarning )
82+ and "Call AsyncMongoClient.close() to safely shut down your client and free up resources."
83+ in str (warning .message )
84+ ):
8185 return True
8286 return False
8387
Original file line number Diff line number Diff line change @@ -75,7 +75,11 @@ def test_cleanup_executors_on_client_del(self):
7575
7676 def resource_warning_caught ():
7777 for warning in w :
78- if isinstance (warning .message , ResourceWarning ):
78+ if (
79+ issubclass (warning .category , ResourceWarning )
80+ and "Call MongoClient.close() to safely shut down your client and free up resources."
81+ in str (warning .message )
82+ ):
7983 return True
8084 return False
8185
You can’t perform that action at this time.
0 commit comments