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:
Victor Stinner 2020-06-10 19:54:29 +02:00 committed by GitHub
parent 8eb4aea262
commit 9c24e2e4c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -7,7 +7,7 @@
from test import support
with support.check_warnings(('', DeprecationWarning)):
import binhex
binhex = support.import_fresh_module('binhex')
class BinHexTestCase(unittest.TestCase):

View file

@ -0,0 +1,2 @@
Fix test_binhex when run twice: it now uses import_fresh_module() to ensure
that it raises DeprecationWarning each time.