Skip to content

Commit af69325

Browse files
authored
bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)
test_binhex now uses import_fresh_module() to ensure that it raises DeprecationWarning each time. (cherry picked from commit 9c24e2e)
1 parent 4a4f660 commit af69325

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Lib/test/test_binhex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from test import support
88

99
with support.check_warnings(('', DeprecationWarning)):
10-
import binhex
10+
binhex = support.import_fresh_module('binhex')
1111

1212

1313
class BinHexTestCase(unittest.TestCase):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix test_binhex when run twice: it now uses import_fresh_module() to ensure
2+
that it raises DeprecationWarning each time.

0 commit comments

Comments
 (0)