| Server IP : 162.19.112.25 / Your IP : 216.73.216.88 Web Server : LiteSpeed System : Linux qamar.tasjeel.ae 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64 User : archiart ( 1428) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib64/python3.9/site-packages/borg/__pycache__/ |
Upload File : |
a
�i9 � @ s� d Z ddlZddlZddlZddlmZmZmZ ddlm Z m
Z
mZ ddlm
Z
ddlmZ e e
ee
egZdZG d d
� d
e�Zdd� ZdS )
af
Self testing module
===================
The selftest() function runs a small test suite of relatively fast tests that are meant to discover issues
with the way Borg was compiled or packaged and also bugs in Borg itself.
These tests are a subset of the borg/testsuite and are run with Pythons built-in unittest, hence none of
the tests used for this can or should be ported to py.test currently.
To assert that self test discovery works correctly the number of tests is kept in the SELFTEST_COUNT
variable. SELFTEST_COUNT must be updated if new tests are added or removed to or from any of the tests
used here.
� N)�
TestResult� TestSuite�defaultTestLoader� )�HashIndexDataTestCase�HashIndexRefcountingTestCase�HashIndexTestCase)�CryptoTestCase)�ChunkerTestCase�! c s@ e Zd Z� fdd�Z� fdd�Zdd� Zdd� Zd d
� Z� ZS )�SelfTestResultc s t � �� g | _d S �N)�super�__init__� successes��self�� __class__� �3/usr/lib64/python3.9/site-packages/borg/selftest.pyr ( s
zSelfTestResult.__init__c s t � �|� | j�|� d S r
)r �
addSuccessr �append�r �testr r r r , s zSelfTestResult.addSuccessc C s |� � pt|�S r
)ZshortDescription�strr r r r � test_name0 s zSelfTestResult.test_namec C sX | j | j | j D ]\}}|�d| �|�|� q| jD ]\}}|�d| �|�|� q6d S )Nzself test %s FAILED:
%szself test %s skipped: %s)�errorsZfailuresZunexpectedSuccesses�errorr ZskippedZwarning)r �loggerr Zfailure�reasonr r r �log_results3 s zSelfTestResult.log_resultsc C s
t | j�S r
)�lenr r r r r �successful_test_count9 s z$SelfTestResult.successful_test_count) �__name__�
__module__�__qualname__r r r r! r# �
__classcell__r r r r r '