mirror of
https://github.com/python/cpython.git
synced 2025-08-09 03:19:15 +00:00
gh-62824: Add alias for iso-8859-8-i which is the same as iso-8859-8 (gh-134306)
Co-authored-by: David Goncalves <davegoncalves@gmail.com> Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
This commit is contained in:
parent
3246ea514d
commit
5ab66a882d
3 changed files with 11 additions and 0 deletions
|
@ -3,6 +3,7 @@ import contextlib
|
|||
import copy
|
||||
import io
|
||||
import pickle
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
import encodings
|
||||
|
@ -3107,6 +3108,13 @@ class TransformCodecTest(unittest.TestCase):
|
|||
info = codecs.lookup(alias)
|
||||
self.assertEqual(info.name, expected_name)
|
||||
|
||||
def test_alias_modules_exist(self):
|
||||
encodings_dir = os.path.dirname(encodings.__file__)
|
||||
for value in encodings.aliases.aliases.values():
|
||||
codec_file = os.path.join(encodings_dir, value + ".py")
|
||||
self.assertTrue(os.path.isfile(codec_file),
|
||||
"Codec file not found: " + codec_file)
|
||||
|
||||
def test_quopri_stateless(self):
|
||||
# Should encode with quotetabs=True
|
||||
encoded = codecs.encode(b"space tab\teol \n", "quopri-codec")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue