cpython/Lib/test/test_email
Barry Warsaw 1fcb39ea64
gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521)
* Rewrite imghdr inlining for clarity and completeness

* Move MIMEImage class back closer to the top of the file since it's the
  important thing.
* Use a decorate to mark a given rule function and simplify the rule function
  names for clarity.
* Copy over all the imghdr test data files into the email package's test data
  directory.  This way when imghdr is actually removed, it won't affect the
  MIMEImage guessing tests.
* Rewrite and extend the MIMEImage tests to test for all supported
  auto-detected MIME image subtypes.
* Remove the now redundant PyBanner048.gif data file.

* See https://github.com/python/cpython/pull/91461#discussion_r850313336

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>

Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
2022-04-14 17:48:59 -07:00
..
data gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521) 2022-04-14 17:48:59 -07:00
__init__.py bpo-43651: PEP 597: Fix test_email (GH-25158) 2021-04-05 12:30:12 +09:00
__main__.py
test__encoded_words.py bpo-38332: Catch KeyError from unknown cte in encoded-word. (GH-16503) 2019-10-05 09:19:15 -07:00
test__header_value_parser.py bpo-46198: rename duplicate tests and remove unused code (GH-30297) 2022-03-10 08:20:11 -08:00
test_asian_codecs.py
test_contentmanager.py bpo-41402: Fix email ContentManager calling .encode() on bytes (GH-21631) 2021-08-09 18:45:41 +02:00
test_defect_handling.py bpo-27397: Make email module properly handle invalid-length base64 strings (#7583) 2018-06-12 15:46:22 +03:00
test_email.py gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521) 2022-04-14 17:48:59 -07:00
test_generator.py bpo-34424: Handle different policy.linesep lengths correctly. (#8803) 2019-05-13 21:07:39 -04:00
test_headerregistry.py bpo-30681: Support invalid date format or value in email Date header (GH-22090) 2020-10-26 17:31:06 -07:00
test_inversion.py bpo-30681: Support invalid date format or value in email Date header (GH-22090) 2020-10-26 17:31:06 -07:00
test_message.py Fix typos in the Lib directory (GH-28775) 2021-10-06 16:13:48 -07:00
test_parser.py #20476: add a message_factory policy attribute to email. 2016-09-09 18:39:18 -04:00
test_pickleable.py
test_policy.py Fix infinite loop in email folding logic (GH-12732) 2019-07-16 10:50:01 -07:00
test_utils.py bpo-30681: Support invalid date format or value in email Date header (GH-22090) 2020-10-26 17:31:06 -07:00
torture_test.py bpo-5846: Do not use obsolete unittest functions. (GH-28303) 2021-09-13 10:49:53 +03:00