bpo-40927: Fix test_binhex when run twice (GH-20764)
test_binhex now uses import_fresh_module() to ensure that it raises DeprecationWarning each time.
This commit is contained in:
parent
8eb4aea262
commit
9c24e2e4c1
|
@ -7,7 +7,7 @@ import unittest
|
|||
from test import support
|
||||
|
||||
with support.check_warnings(('', DeprecationWarning)):
|
||||
import binhex
|
||||
binhex = support.import_fresh_module('binhex')
|
||||
|
||||
|
||||
class BinHexTestCase(unittest.TestCase):
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Fix test_binhex when run twice: it now uses import_fresh_module() to ensure
|
||||
that it raises DeprecationWarning each time.
|
Loading…
Reference in New Issue