Staging
v0.5.1
https://github.com/python/cpython
Revision 6979fcdc91114b1ccb16345e26734d6df4cccbc3 authored by Victor Stinner on 28 November 2017, 22:04:12 UTC, committed by GitHub on 28 November 2017, 22:04:12 UTC
* turtledemo: wait until macOS osascript command completes to not
  create a zombie process
* Tools/scripts/treesync.py: declare 'default_answer' and
  'create_files' as globals to modify them with the command line
  arguments. Previously, -y, -n, -f and -a options had no effect.

flake8 warning: "F841 local variable 'p' is assigned to but never
used".
1 parent 5f6d2bb
Raw File
Tip revision: 6979fcdc91114b1ccb16345e26734d6df4cccbc3 authored by Victor Stinner on 28 November 2017, 22:04:12 UTC
bpo-32155: Bugfixes found by flake8 F841 warnings (#4619)
Tip revision: 6979fcd
test_codecencodings_tw.py
#
# test_codecencodings_tw.py
#   Codec encoding tests for ROC encodings.
#

from test import multibytecodec_support
import unittest

class Test_Big5(multibytecodec_support.TestBase, unittest.TestCase):
    encoding = 'big5'
    tstring = multibytecodec_support.load_teststring('big5')
    codectests = (
        # invalid bytes
        (b"abc\x80\x80\xc1\xc4", "strict",  None),
        (b"abc\xc8", "strict",  None),
        (b"abc\x80\x80\xc1\xc4", "replace", "abc\ufffd\ufffd\u8b10"),
        (b"abc\x80\x80\xc1\xc4\xc8", "replace", "abc\ufffd\ufffd\u8b10\ufffd"),
        (b"abc\x80\x80\xc1\xc4", "ignore",  "abc\u8b10"),
    )

if __name__ == "__main__":
    unittest.main()
back to top