관리-도구
편집 파일: test__datasource.cpython-311.pyc
� �܋fK) � � � d dl Z d dlZd dlmZmZmZ d dlmZ d dlm c m Z d dlm Z mZmZ d dlmZ d dlmZ d dlmZ d%d�Zdad� Zd � Zd ZdZdZd Zg d�ZdZ d� Z!d� Z"d� Z#d� Z$d� Z%d� Z&d� Z'd� Z( G d� d� � Z) G d� d� � Z* G d� d� � Z+ G d� d� � Z, G d � d!� � Z- G d"� d#� � Z.d$� Z/dS )&� N)�mkdtemp�mkstemp�NamedTemporaryFile)�rmtree)�assert_�assert_equal� assert_raises)�urlparse)�URLErrorc �h � | t � � k rt d�� � }|S t d� � �)z$Stub to replace urlopen for testing.�urltmp_)�prefixzName or service not known)� valid_httpurlr r )�url�data�tmpfiles �s/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/numpy/lib/tests/test__datasource.py�urlopen_stubr s5 � � �m�o�o���$�I�6�6�6�����2�3�3�3� c �@ � t j at t _ d S �N)�urllib_request�urlopen�old_urlopenr � r r �setup_moduler s � � !�(�K�)�N���r c �( � t t _ d S r )r r r r r r �teardown_moduler ! s � �(�N���r zhttp://www.google.com/z index.htmlzhttp://fake.abc.web/site/zfake.txt)z/etc/shadowz../../shadowz ..\system.datzc:\windows\system.dats three is the magic numberc �Z � t dd| d�� � \ }}t j |� � |S )N�.txt�dstmp_T)�suffixr �dir�text)r �os�close��filedir�fd�paths r �valid_textfiler+ 2 s. � ��f�X�7��N�N�N�H�B���H�R�L�L�L��Kr c � � t dd| �� � \ }}t j |� � t j |� � |S )Nr r! )r"