aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_email.py2
-rw-r--r--Lib/test/test_imghdr.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
index ca9c773bbc5..b87dae22de1 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -7,6 +7,7 @@ import time
import base64
import unittest
import textwrap
+import warnings
from io import StringIO, BytesIO
from itertools import chain
@@ -1591,7 +1592,6 @@ class TestMIMEImage(unittest.TestCase):
header='foobar'), missing)
-
# Test the basic MIMEApplication class
class TestMIMEApplication(unittest.TestCase):
def test_headers(self):
diff --git a/Lib/test/test_imghdr.py b/Lib/test/test_imghdr.py
index ca0a0b23c3c..208c8eee455 100644
--- a/Lib/test/test_imghdr.py
+++ b/Lib/test/test_imghdr.py
@@ -1,12 +1,13 @@
-import imghdr
import io
import os
import pathlib
import unittest
import warnings
-from test.support import findfile
+from test.support import findfile, warnings_helper
from test.support.os_helper import TESTFN, unlink
+imghdr = warnings_helper.import_deprecated("imghdr")
+
TEST_FILES = (
('python.png', 'png'),