mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-104773: PEP 594: Remove the imghdr module (#104777)
* Remove the Lib/test/imghdrdata/ directory. * Copy 5 pictures (gif, png, ppm, pgm, xbm) from removed Lib/test/imghdrdata/ to a new Lib/test/tkinterdata/ directory. * Update Sphinx from 4.5 to 6.2 in Doc/requirements.txt.
This commit is contained in:
parent
ba73473f4c
commit
e399f46a77
28 changed files with 21 additions and 425 deletions
|
@ -66,7 +66,7 @@ class BitmapImageTest(AbstractTkTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
AbstractTkTest.setUpClass.__func__(cls)
|
||||
cls.testfile = support.findfile('python.xbm', subdir='imghdrdata')
|
||||
cls.testfile = support.findfile('python.xbm', subdir='tkinterdata')
|
||||
|
||||
def test_create_from_file(self):
|
||||
image = tkinter.BitmapImage('::img::test', master=self.root,
|
||||
|
@ -150,7 +150,7 @@ class PhotoImageTest(AbstractTkTest, unittest.TestCase):
|
|||
@classmethod
|
||||
def setUpClass(cls):
|
||||
AbstractTkTest.setUpClass.__func__(cls)
|
||||
cls.testfile = support.findfile('python.gif', subdir='imghdrdata')
|
||||
cls.testfile = support.findfile('python.gif', subdir='tkinterdata')
|
||||
|
||||
def create(self):
|
||||
return tkinter.PhotoImage('::img::test', master=self.root,
|
||||
|
@ -163,7 +163,7 @@ class PhotoImageTest(AbstractTkTest, unittest.TestCase):
|
|||
return tkinter._join(args)
|
||||
|
||||
def check_create_from_file(self, ext):
|
||||
testfile = support.findfile('python.' + ext, subdir='imghdrdata')
|
||||
testfile = support.findfile('python.' + ext, subdir='tkinterdata')
|
||||
image = tkinter.PhotoImage('::img::test', master=self.root,
|
||||
file=testfile)
|
||||
self.assertEqual(str(image), '::img::test')
|
||||
|
@ -178,7 +178,7 @@ class PhotoImageTest(AbstractTkTest, unittest.TestCase):
|
|||
self.assertNotIn('::img::test', self.root.image_names())
|
||||
|
||||
def check_create_from_data(self, ext):
|
||||
testfile = support.findfile('python.' + ext, subdir='imghdrdata')
|
||||
testfile = support.findfile('python.' + ext, subdir='tkinterdata')
|
||||
with open(testfile, 'rb') as f:
|
||||
data = f.read()
|
||||
image = tkinter.PhotoImage('::img::test', master=self.root,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue