File: //lib64/python3.6/test/__pycache__/test_ntpath.cpython-36.pyc
3
\�_ � @ s� d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm Z m
Z
d dlmZ dd� Z
G dd� dej�ZG d d
� d
e
jej�ZG dd� dej�Zed
kr�ej� dS )� N)�
TestFailed�FakePath)�support�test_genericpath)�
TemporaryFilec
C s2 | j dd�} t| �}||kr:tdt| �t|�t|�f ��| j dd�} | j dd�} | j dd �} | j d
d�} | j dd
�} | j dd�} tj| �jd�} | jdd�jd�} tj � � tj
dt� t| �}W d Q R X t|t�r�tj|�}nt|t
�r�t
dd� |D ��}t| �}||k�r.tdt| �t|�t|�f ��d S )N�\z\\z%%s should return: %s but returned: %sz('z(b'z("z(b"z['z[b'z["z[b"z, 'z, b'z, "z, b"�latin1�ascii�backslashreplace�ignorec s s | ]}t j|�V qd S )N)�os�fsencode)�.0�r� r �#/usr/lib64/python3.6/test_ntpath.py� <genexpr>! s ztester.<locals>.<genexpr>)�replace�evalr �strr r
�decode�encode�warnings�catch_warnings�simplefilter�DeprecationWarning�
isinstance�tuple�repr)�fnZ
wantResultZ gotResultr r r �tester s0
r c @ s� e Zd Zdd� Zdd� Zdd� Zdd� Zd d
� Zdd� Zd
d� Z dd� Z
dd� Zej
ejd�dd� �Zdd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"S )#�
TestNtpathc C sh t dd� t dd� t dd� t dd� t d
d� t dd� t d
d� t dd� t dd� t dd� d S ) Nzntpath.splitext("foo.ext")�foo�.extzntpath.splitext("/foo/foo.ext")�/foo/foozntpath.splitext(".ext")� zntpath.splitext("\foo.ext\foo")�\foo.ext\foozntpath.splitext("foo.ext\")�foo.ext\zntpath.splitext("")zntpath.splitext("foo.bar.ext")�foo.barz!ntpath.splitext("xx/foo.bar.ext")�
xx/foo.barz!ntpath.splitext("xx\foo.bar.ext")�
xx\foo.barzntpath.splitext("c:a/b\c.d")�c:a/b\c�.d)r"