Your IP : 216.73.216.213
�
h fv � @ s� d Z d d l Z d d l Z d d l m Z m Z d d l m Z e d � Z Gd d � d e j � Z
Gd d � d e j � Z d
d � Z e
d k r� e � n d S)
z:
Very minimal unittests for parts of the readline module.
� N)�run_unittest�
import_module)�assert_python_ok�readlinec @ s= e Z d Z d Z e j e e d � d � d d � � Z d S)�TestHistoryManipulationz�
These tests were added to check that the libedit emulation on OSX and the
"real" readline have the same interface for history manipulation. That's
why the tests cover only a small subset of the interface.
�
clear_historyzXThe history update test cannot be run because the clear_history method is not available.c C s9 t j � t j d � t j d � | j t j d � d � | j t j d � d � | j t j d � d � t j d d � | j t j d � d � | j t j d � d � | j t j d � d � | j t j � d � t j d � | j t j d � d � | j t j d � d � | j t j � d � d S)Nz
first linezsecond liner � � z
replaced line)r r Zadd_history�assertEqualZget_history_itemZreplace_history_item�get_current_history_lengthZremove_history_item)�self� r
�7/opt/alt/python34/lib64/python3.4/test/test_readline.py�testHistoryUpdates s
z*TestHistoryManipulation.testHistoryUpdatesN) �__name__�
__module__�__qualname__�__doc__�unittestZ
skipUnless�hasattrr r r
r
r
r r s r c @ sF e Z d Z e j e j d k o- d e j k d � d d � � Z d S)�TestReadlinei �libeditz%not supported in this library versionc C s2 t d d d d �\ } } } | j | d � d S)Nz-czimport readlineZTERMzxterm-256color� )r r
)r �rc�stdout�stderrr
r
r � test_init0 s zTestReadline.test_initN) r r r r ZskipIfr Z_READLINE_VERSIONr r r
r
r
r r . s r c C s t t t � d S)N)r r r r
r
r
r � test_main<