Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/blessings/__pycache__/tests.cpython-39.pyc
Ðазад
a k�h:! � @ s, d Z ddlmZmZ ddlmZ ddlZddlmZ ddl m Z ddlmZ ddl T eed d �Zdd� Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd#d$� Zd%d&� Zd'd(� Zd)d*� Zd+d,� Z d-d.� Z!d/d0� Z"d1d2� Z#d3d4� Z$d5d6� Z%d7d8� Z&d9d:� Z'd;d<� Z(dS )=a� Automated tests (as opposed to human-verified test patterns) It was tempting to mock out curses to get predictable output from ``tigetstr``, but there are concrete integration-testing benefits in not doing so. For instance, ``tigetstr`` changed its return type in Python 3.2.3. So instead, we simply create all our test ``Terminal`` instances with a known terminal type. All we require from the host machine is that a standard terminfo definition of xterm-256color exists. � )�tigetstr�tparm)�partialN)�SkipTest)�eq_)�StringIO)�*zxterm-256color)�kindc C s t | ��d�S )z4Return the result of ``tigetstr`` except as Unicode.�latin1)r �decode)�cap� r �/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/blessings/tests.py�unicode_cap s r c G s t t| �g|�R � �d�S )z=Return the result of ``tparm(tigetstr())`` except as Unicode.r )r r r )r Zparmsr r r �unicode_parm! s r c C s* t � } td�}t| j|� t| j|� dS )z�Check that a capability lookup works. Also test that Terminal grabs a reasonable default stream. This test assumes it will be run from a tty. �scN)�TestTerminalr r �save)�tr r r r �test_capability&