mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Update test_charmapcodec.py to 3.14.4 (#7810)
This commit is contained in:
1 parent
f6969e6cf1
commit
85f14a74b9
1 file changed
+5
-2
Vendored
+5
-2
@@ -20,12 +20,15 @@ def codec_search_function(encoding):
|
||||
return tuple(testcodec.getregentry())
|
||||
return None
|
||||
|
||||
codecs.register(codec_search_function)
|
||||
|
||||
# test codec's name (see test/testcodec.py)
|
||||
codecname = 'testcodec'
|
||||
|
||||
class CharmapCodecTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
codecs.register(codec_search_function)
|
||||
self.addCleanup(codecs.unregister, codec_search_function)
|
||||
|
||||
def test_constructorx(self):
|
||||
self.assertEqual(str(b'abc', codecname), 'abc')
|
||||
self.assertEqual(str(b'xdef', codecname), 'abcdef')
|
||||
|
||||
Reference in new issue
Block a user