Skip to content

Commit

Permalink
bpo-40927: Fix test_binhex when run twice (GH-20764) (GH-20789)
Browse files Browse the repository at this point in the history
test_binhex now uses import_fresh_module() to ensure that it raises
DeprecationWarning each time.

(cherry picked from commit 9c24e2e)
  • Loading branch information
vstinner authored Jun 10, 2020
1 parent 4a4f660 commit af69325
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_binhex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix test_binhex when run twice: it now uses import_fresh_module() to ensure
that it raises DeprecationWarning each time.

0 comments on commit af69325

Please sign in to comment.