Mini Shell
U
��eg�1 � @ s� d dl mZmZmZ d dlZd dlZd dlmZ d dlZG dd� dej �Z
G dd� d�ZG dd � d e�ZG d
d� de�Z
G dd
� d
e�ZdS )� )�findfile�TESTFN�unlinkN)�mockc @ s e Zd Zdd� Zdd� ZdS )�UnseekableIOc C s
t j�d S �N��io�UnsupportedOperation��self� r
�./opt/cppython/lib/python3.8/test/audiotests.py�tell s zUnseekableIO.tellc O s
t j�d S r r )r �args�kwargsr
r
r �seek s zUnseekableIO.seekN)�__name__�
__module__�__qualname__r r r
r
r
r r s r c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �
AudioTestsFc C s d | _ | _d S r )�f�foutr r
r
r �setUp s zAudioTests.setUpc C s4 | j d k r| j �� | jd k r(| j�� tt� d S r )r �closer r r r r
r
r �tearDown s
zAudioTests.tearDownc C s
| � |�� |� | � |�� |� | � |�� |� | � |�� |� | � |�� |� | � |�� |� |�� }| � |||||||f� | � |j|� | � |j |� | � |j
|� | � |j|� | � |j|� | � |j
|� ttjd �D ]"} t�|| �}
| � t�|
�|� q�d S )N� )�assertEqual�getnchannels�getsampwidth�getframerate�
getnframesZgetcomptypeZgetcompname� getparams� nchannels� sampwidth� framerate�nframes�comptype�compname�range�pickle�HIGHEST_PROTOCOL�dumps�loads)r r r# r$ r% r&