Current File : //opt/imh-python/lib/python2.7/test/test_source_encoding.pyc |
�
��Wc @ s� d d l Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d e j f d � � YZ d d
d � � YZ
d e
e j f d � � YZ d e
e j f d
� � YZ d � Z
e d k r� e
� n d S( i����N( t run_unittestt rmtreet captured_stdoutt MiscSourceEncodingTestc B sb e Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z
d � Z RS(
c C s6 | j d j d � d � | j d j d � d � d S( Nu
Питонs utf-8s
Питонu \Пs \П( t assertEqualt encode( t self( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_pep263 s c B s8 e d d d � } i } | | U| j | d d � d S( Ns
# coding: utf-8
u = u'ó'
t dummyt exect uu ó( t compileR ( R t ct d( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_compilestring s c B s` e d d d � } i } | | U| j | d | d � | j e | d � e | d � � d S( Ns! a, b = '\U0001010F', '\U0001010F'R R t at b( R R t len( R R R
( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_issue3297 s
c C s* | j t t d � | j t t d � d S( Ns � s � ( t assertRaisest SyntaxErrort eval( R ( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_issue7820# s c C s t d d d � t d d d � t d d d � | j t d � � t d d d � Wd QX| j t d � � t d d d � Wd QX| j t d
� � t d d d � Wd QX| j t d � � t d d d � Wd QX| j t d
� � t d d d � Wd QXd S( Ns # -*- coding: iso-8859-15 -*-
R R s
s # -*- coding: utf-8 -*-
t fakes # -*- coding: fake -*-
s iso-8859-15s! # -*- coding: iso-8859-15 -*-
t BOMs # -*- coding: fake -*-
( R t assertRaisesRegexpR ( R ( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_error_message. s c C s- | j t d � � d d l m } Wd QXd S( Ns codec did not return a unicodei����( t bad_coding3( R R t testR ( R R ( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_non_unicode_codec? s
c C s d } | j | � d S( Nt
bad_coding( t verify_bad_module( R t module_name( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_bad_codingE s c C s d } | j | � d S( Nt bad_coding2( R ( R R ( ( sr /builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/test/test_source_encoding.pyt test_bad_coding2I s c C s� | j t t d | � t j j t � } t j j | | d � } t | � � } | j � } Wd QX| j t t
| | d � d S( Ns test.s .pyR ( R R t
__import__t ost patht dirnamet __file__t joint opent readR ( R R R&