def METHOD_NAME(self):
    for filename, expected in TEST_FILES:
        filename = findfile(filename, subdir='imghdrdata')
        self.assertEqual(imghdr.what(filename), expected)
        with open(filename, 'rb') as stream:
            self.assertEqual(imghdr.what(stream), expected)
        with open(filename, 'rb') as stream:
            data = stream.read()
        self.assertEqual(imghdr.what(None, data), expected)
        self.assertEqual(imghdr.what(None, bytearray(data)), expected)