Skip to content

Commit

Permalink
bpo-40927: Fix test_binhex when run twice (GH-20764)
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.
  • Loading branch information
vstinner committed Jun 10, 2020
1 parent 8eb4aea commit 9c24e2e
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
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
@@ -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 9c24e2e

Please sign in to comment.