|
Server : LiteSpeed System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64 User : nandedex ( 1060) PHP Version : 8.1.33 Disable Function : NONE Directory : /opt/cppython/lib/python3.8/test/__pycache__/ |
U
>��g�0 � @ s d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlm Z d dl
Z
e�� Zee j
�ej�gZdddddgdgdgd gZdddddd
gdgdgdgZdddd
dddgddgg dgZdddddddd
ddg ddgg dgZdd
dddddddddddgg g dgZdddddddddddd dd!g
g g d"gZdddgd#gg d$gZdddgg g d%gZddgg g d&gZddddgd'gg d(gZddddd)gdgg d*gZd+d+d,gg g d-gZd+d+d,gg g d.gZd/d/d,gg g d0d1�d2� gZd3d4� Z d5d6� Z!G d7d8� d8ej"�Z#e$d9k�re�%� dS ):� N)�supportza.module�a�sys�b�czb.somethingz�a/__init__.py
a/module.py
from b import something
from c import something
b/__init__.py
from sys import *
Z
__future__a a/__init__.py
a/module.py
from b import something
from c import something
b/__init__.py
from __future__ import absolute_import
from sys import *
za.bza.cZmymoduleZblahblaha mymodule.py
a/__init__.py
import blahblah
from a import b
import c
a/module.py
import sys
from a import b as x
from a.c import sillyname
a/b.py
a/c.py
from a.module import x
import mymodule as sillyname
from sys import version_info
zb.xzb.yzb.z�gc�zaj mymodule.py
a/__init__.py
a/module.py
from __future__ import absolute_import
import sys # sys
import blahblah # fails
import gc # gc
import b.x # b.x
from b import y # b.y
from b.z import * # b.z.*
a/gc.py
a/sys.py
import mymodule
a/b/__init__.py
a/b/x.py
a/b/y.py
a/b/z.py
b/__init__.py
import z
b/unused.py
b/x.py
b/y.py
b/z.py
za.b.yza.b.zza.b.cz
a.b.c.moduleCza.b.c.dza.b.c.eza.b.xa� mymodule.py
a/__init__.py
from .b import y, z # a.b.y, a.b.z
a/module.py
from __future__ import absolute_import # __future__
import gc # gc
a/gc.py
a/sys.py
a/b/__init__.py
from ..b import x # a.b.x
#from a.b.c import moduleC
from .c import moduleC # a.b.moduleC
a/b/x.py
a/b/y.py
a/b/z.py
a/b/g.py
a/b/c/__init__.py
from ..c import e # a.b.c.e
a/b/c/moduleC.py
from ..c import d # a.b.c.d
a/b/c/d.py
a/b/c/e.py
a/b/c/x.py
za.sysza.b.c.fz a.anothera� mymodule.py
a/__init__.py
from . import sys # a.sys
a/another.py
a/module.py
from .b import y, z # a.b.y, a.b.z
a/gc.py
a/sys.py
a/b/__init__.py
from .c import moduleC # a.b.c.moduleC
from .c import d # a.b.c.d
a/b/x.py
a/b/y.py
a/b/z.py
a/b/c/__init__.py
from . import e # a.b.c.e
a/b/c/moduleC.py
#
from . import f # a.b.c.f
from .. import x # a.b.x
from ... import another # a.another
a/b/c/d.py
a/b/c/e.py
a/b/c/f.py
za.barz�a/__init__.py
def foo(): pass
a/module.py
from . import foo
from . import bar
zza/__init__.py
def foo(): pass
a/module.py
from . import *
� zb.modulez�a/__init__.py
a/module.py
import b.module
b/__init__.py
b/module.py
? # SyntaxError: invalid syntax
zb.cz�a/__init__.py
a/module.py
import c
from b import c
b/__init__.py
b/c.py
Za_utf8Zb_utf8u� a_utf8.py
# use the default of utf8
print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
import b_utf8
b_utf8.py
# use the default of utf8
print('Unicode test B code point 2090 ₐ that is not valid in cp1252')
uz a_utf8.py
# coding=utf8
print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
import b_utf8
b_utf8.py
# use the default of utf8
print('Unicode test B code point 2090 ₐ that is not valid in cp1252')
Za_cp1252s� a_cp1252.py
# coding=cp1252
# 0xe2 is not allowed in utf8
print('CP1252 test P�t�')
import b_utf8
u� b_utf8.py
# use the default of utf8
print('Unicode test A code point 2090 ₐ that is not valid in cp1252')
�utf-8c
C sV t j�| �}zt �|� W n0 tk
rJ } z|jtjkr:� W 5 d }~X Y nX t| d�S )N�wb)�os�path�dirname�makedirs�OSError�errno�EEXIST�open)r
r �e� r �5/opt/cppython/lib/python3.8/test/test_modulefinder.py� open_file% s r c C s� d }z�| �� D ]z}t|�tkr(|�d�}|�d�s<|�d�rP|�|�� d � q|r\|� � t|�tkrr|�d�}t t
j�t
|�� ��}qW 5 |r�|� � X d S )Nr
� � �
)�close�
splitlines�type�bytes�encode�
startswith�write�strip�decoder r r
�join�TEST_DIR)�sourceZofi�liner r r �create_package/ s
r( c @ s� e Zd Zddg ejfdd�Zdd� Zdd� Zd d
� Zdd� Z d
d� Z
dd� Zdd� Zdd� Z
dd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'S )(�ModuleFinderTestFr c C s� |\}}}} }
t |
� zn|t||d�}|�|� |r<|�� tt|��}t|j �}| �
||� |�� \}
}| �
|
|� | �
|| � W 5 t�t� X d S )N)r
�debug�
replace_paths)r( �shutil�rmtreer% � TEST_PATHZimport_hook�report�sorted�set�modulesZassertEqualZany_missing_maybe)�self�infor/ r* r+ �modulefinder_classZimport_thisr2 �missingZ
maybe_missingr&