blob: 20063195dc56d69e397a8fa565501d59f7b1ce9e [file] [log] [blame]
#!/usr/bin/env python3
# -*- coding: latin-1
# Test __future__ imports
from __future__ import print_function
"""Integration test program G for Subpar.
Test bootstrap interaction with __future__ imports and source file encodings.
"""
# Test the source file encoding specification above. See PEP 263 for
# details. In the line below, this source file contains a byte
# sequence that is valid latin-1 but not valid utf-8. Specifically,
# between the two single quotes is a single byte 0xE4 (latin-1
# encoding of LATIN SMALL LETTER A WITH DIAERESIS), and _not_ the
# two-byte UTF-8 sequence 0xC3 0xA4.
latin_1_bytes = u'รค'
assert len(latin_1_bytes) == 1
assert ord(latin_1_bytes[0]) == 0xE4