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):
77
77
78
78
def resource_warning_caught ():
79
79
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
+ ):
81
85
return True
82
86
return False
83
87
Original file line number Diff line number Diff line change @@ -75,7 +75,11 @@ def test_cleanup_executors_on_client_del(self):
75
75
76
76
def resource_warning_caught ():
77
77
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
+ ):
79
83
return True
80
84
return False
81
85
You can’t perform that action at this time.
0 commit comments