File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -780,6 +780,9 @@ class WarningsFixture(fixtures.Fixture):
780
780
781
781
def setUp (self ):
782
782
super (WarningsFixture , self ).setUp ()
783
+
784
+ self ._original_warning_filters = warnings .filters [:]
785
+
783
786
# NOTE(sdague): Make deprecation warnings only happen once. Otherwise
784
787
# this gets kind of crazy given the way that upstream python libs use
785
788
# this.
@@ -836,7 +839,10 @@ def setUp(self):
836
839
message = 'Implicit coercion of SELECT and textual SELECT .*' ,
837
840
category = sqla_exc .SADeprecationWarning )
838
841
839
- self .addCleanup (warnings .resetwarnings )
842
+ self .addCleanup (self ._reset_warning_filters )
843
+
844
+ def _reset_warning_filters (self ):
845
+ warnings .filters [:] = self ._original_warning_filters
840
846
841
847
842
848
class ConfPatcher (fixtures .Fixture ):
You can’t perform that action at this time.
0 commit comments