mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Remove test.test_support.guard_warnings_filter.
test.test_support.catch_warning is more full-featured and provides the same functionality. Since guard_warnings_filter was added in 2.6 there is no backwards-compatibility issues.
This commit is contained in:
parent
be7abbb9d9
commit
2ee4128e9b
10 changed files with 18 additions and 32 deletions
|
@ -178,7 +178,7 @@ class WichmannHill_TestBasicOps(TestBasicOps):
|
|||
|
||||
def test_bigrand(self):
|
||||
# Verify warnings are raised when randrange is too large for random()
|
||||
with test_support.guard_warnings_filter():
|
||||
with test_support.catch_warning():
|
||||
warnings.filterwarnings("error", "Underlying random")
|
||||
self.assertRaises(UserWarning, self.gen.randrange, 2**60)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue