Uname : Linux serv1.rebootns.com 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
Soft : LiteSpeed
Ip : 139.99.125.122
Port : 443
~
/
usr
/
lib64
/
python3.9
/
site-packages
/
borg
/
__pycache__
[ HOME ]
Exec
Submit
selftest.cpython-39.pyc
a HZ�h9 � @ 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 '