%PDF- %PDF-
Direktori : /opt/plesk/python/2.7/lib64/python2.7/test/ |
Current File : //opt/plesk/python/2.7/lib64/python2.7/test/test_site.pyc |
� 5}�ac @ sn d Z d d l Z d d l m Z m Z m Z d d l m Z d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d e j k r� d d l Z n e j d � � e a d � Z d � Z d e j f d � � YZ d e f d � � YZ d e j f d � � YZ d � Z e d k rje � n d S( s Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. i����N( t run_unittestt TESTFNt EnvironmentVarGuard( t captured_output( t support( t copyt sites! importation of site.py suppressedc C s� t j a t j r� t j j t j � r� y$ t j t j � t j t j � Wq� t k r� } | j t j t j f k r� t j d t j | f � � q� � q� Xn d S( Ns- unable to create user site directory (%r): %s( t syst patht OLD_SYS_PATHR t ENABLE_USER_SITEt ost isdirt USER_SITEt makedirst addsitedirt OSErrort errnot EACCESt EPERMt unittestt SkipTest( t exc( ( s7 /opt/plesk/python/2.7/lib64/python2.7/test/test_site.pyt setUpModule! s c C s t t j (d S( N( R R R ( ( ( s7 /opt/plesk/python/2.7/lib64/python2.7/test/test_site.pyt tearDownModule3 s t HelperFunctionsTestsc B s� e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d e d � Z d � Z d � Z e j e j d k d � d � � Z d � Z e j e j d � d � � Z d � Z d � Z d � Z d � Z RS( s� Tests for helper functions. The setting of the encoding (set using sys.setdefaultencoding) used by the Unicode implementation is not tested. c C sG t j | _ t j | _ t j | _ t j | _ t t j � | _ d S( s Save a copy of sys.pathN( R R t sys_pathR t USER_BASEt old_baseR t old_sitet PREFIXESt old_prefixesR t sysconfigt _CONFIG_VARSt old_vars( t self( ( s7 /opt/plesk/python/2.7/lib64/python2.7/test/test_site.pyt setUp? s c C sA | j t j (| j t _ | j t _ | j t _ | j t _ d S( s Restore sys.pathN( R R R R R R R R R R R"