Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/constantly/test/__pycache__/test_constants.cpython-39.pyc
Ðазад
a i�h� � @ sD d Z ddlmZmZ ddlmZ ddlmZmZm Z m Z mZmZ G dd� de�Z G dd� de�ZG d d � d ee�ZG dd� dee�ZG d d� de�ZG dd� deee�ZG dd� dee�ZG dd� dee�ZG dd� dee�ZG dd� dee�ZG dd� de�ZG dd� de�ZG dd� de�ZG dd � d e �ZG d!d"� d"e�Zd#S )$z Unit tests for L{constantly}. � )�division�absolute_import)�TestCase)� NamedConstant�Names� ValueConstant�Values�FlagConstant�Flagsc @ s@ e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dS )�NamedConstantTestszk Tests for the L{constantly.NamedConstant} class which is used to represent individual values. c C s G dd� dt �}|| _dS )zN Create a dummy container into which constants can be placed. c @ s e Zd ZdS )z%NamedConstantTests.setUp.<locals>.fooN)�__name__� __module__�__qualname__� r r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/constantly/test/test_constants.py�foo s r N)r � container)�selfr r r r �setUp s zNamedConstantTests.setUpc C s( t � }|�| jdd� | �d|j� dS )z� The C{name} attribute of a L{NamedConstant} refers to the value passed for the C{name} parameter to C{_realize}. �barN)r �_realizer �assertEqual�name�r r r r r � test_name s zNamedConstantTests.test_namec C s* t � }|�| jdd� | �dt|�� dS )z� The string representation of an instance of L{NamedConstant} includes the container the instances belongs to as well as the instance's name. r Nz <foo=bar>)r r r r �reprr r r r �test_representation* s z&NamedConstantTests.test_representationc C s6 t � }|�| jdd� | �||k� | �||k� dS )zG A L{NamedConstant} instance compares equal to itself. r N)r r r � assertTrue�assertFalser r r r � test_equality4 s z NamedConstantTests.test_equalityc C sL t � }|�| jdd� t � }|�| jdd� | �||k� | �||k� dS )zf Two different L{NamedConstant} instances do not compare equal to each other. r N)r r r r r �r �first�secondr r r �test_nonequality>