Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_syslog.cpython-311.opt-1.pyc |
�
�Ke
� � � d dl mZmZ ej d� � Zd dlmZ d dlZd dlZd dl Z d dl
Z
G d� de
j � � Ze
dk r e
j � � dS dS )� )�
import_helper�threading_helper�syslog)�supportNc �n � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
ej � � d � � � Z
d
S )�Testc �8 � t � � � d S �N)r �closelog��selfs �:/usr/local/apps/python3/lib/python3.11/test/test_syslog.py�tearDownz
Test.tearDown s � ��������� c � � t � d� � | � t t j d� � d S )N�pythonu �)r �openlog�assertRaises�UnicodeEncodeErrorr s r �test_openlogzTest.test_openlog s5 � ����x� � � ����,�f�n�h�G�G�G�G�Gr c � � t � d� � t � d� � t � t j d� � d S )Nr �$test message from python test_syslog�"test error from python test_syslog)r r �LOG_ERRr s r �test_syslogzTest.test_syslog sD � ����x� � � ��
�
�<�=�=�=��
�
�f�n�&J�K�K�K�K�Kr c � � t � � � t � d� � t � t j d� � d S )Nr r )r r r r s r �test_syslog_implicit_openzTest.test_syslog_implicit_open sB � ��������
�
�<�=�=�=��
�
�f�n�&J�K�K�K�K�Kr c � � t � d� � t � � � t � � � d S )Nr )r r r r s r �
test_closelogzTest.test_closelog! s: � ����x� � � ��������������r c �: � t � t j � � }t � |� � }| � t � d� � |� � | � t � |� � |� � d S )Nr )r �LOG_UPTO�LOG_WARNING�
setlogmask�assertEqual)r
�mask�oldmasks r �test_setlogmaskzTest.test_setlogmask&