HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/twisted/trial/test/__pycache__/packages.cpython-38.pyc
U


W[��@s�dZddlmZmZddlZddlZddlmZddlm	Z	erNddl
mZndd�Zd	Z
e
�d
d�ZdZd
ZGdd�de	j�ZGdd�de�ZdS)zf
Classes and functions used by L{twisted.trial.test.test_util}
and L{twisted.trial.test.test_loader}.
�)�division�absolute_importN)�_PY3)�unittest)�invalidate_cachescCsdS)zJ
        On python 2, import caches don't need to be invalidated.
        N�rrr�=/usr/lib/python3/dist-packages/twisted/trial/test/packages.py�invalidateImportCachessr	zv
from twisted.trial import unittest

class FooTest(unittest.SynchronousTestCase):
    def testFoo(self):
        pass
�
z
a�
'''This module is used by test_loader to test the Trial test loading
functionality. Do NOT change the number of tests in this module.
Do NOT change the names the tests in this module.
'''

import unittest as pyunit
from twisted.trial import unittest

class FooTest(unittest.SynchronousTestCase):
    def test_foo(self):
        pass

    def test_bar(self):
        pass


class PyunitTest(pyunit.TestCase):
    def test_foo(self):
        pass

    def test_bar(self):
        pass


class NotATest(object):
    def test_foo(self):
        pass


class AlphabetTest(unittest.SynchronousTestCase):
    def test_a(self):
        pass

    def test_b(self):
        pass

    def test_c(self):
        pass
a�
'''This module is used by test_loader to test the Trial test loading
functionality. Do NOT change the number of tests in this module.
Do NOT change the names the tests in this module.
'''

from twisted.trial import unittest

class X(object):

    def test_foo(self):
        pass

class A(unittest.SynchronousTestCase, X):
    pass

class B(unittest.SynchronousTestCase, X):
    pass

c@s�eZdZddddddddefd	d
efddefd
defddefgZdd�Zdd�Z	dd�Z
d!dd�Zdd�Zd"dd�Z
dd �ZdS)#�PackageTest)zbadpackage/__init__.py�frotz
)zbadpackage/test_module.py�)zpackage2/__init__.pyr
)zpackage2/test_module.pyz
import frotz
)zpackage/__init__.pyr
)zpackage/frotz.pyr)zpackage/test_bad_module.pyz%raise ZeroDivisionError("fake error")zpackage/test_dos_module.py)zpackage/test_import_module.pyzimport frotzzpackage/test_module.py)zgoodpackage/__init__.pyr
zgoodpackage/test_sample.py)zgoodpackage/sub/__init__.pyr
zgoodpackage/sub/test_sample.py)zinheritancepackage/__init__.pyr
zinheritancepackage/test_x.pycCs<tj�|�d}|�d�}|ddkr2|dd�}d�|�S)Nr�/����__init__�.)�os�path�splitext�split�join)�self�filename�nameZsegsrrr�
_toModuleName{s

zPackageTest._toModuleNamecs�fdd��jD�S)zQ
        Return matching module names for files listed in C{self.files}.
        csg|]\}}��|��qSr)r)�.0r�code�rrr�
<listcomp>�sz*PackageTest.getModules.<locals>.<listcomp>)�filesrrrr�
getModules�szPackageTest.getModulesc	CsH|��}|��|��|D]&}ztj|=Wqtk
r@YqXqdS�N)r �sort�reverse�sys�modules�KeyError)rr%�modulerrr�cleanUpModules�szPackageTest.cleanUpModulesrc
CsL|jD]@\}}tj�||�}|�|�t|d��}|�|�W5QRXqdS)N�w)rrrr�_createDirectory�open�write)rr�	parentDirr�contents�fdrrr�createFiles�s

zPackageTest.createFilescCs&tj�|�}tj�|�s"t�|�dSr!)rr�dirname�exists�makedirs)rrZ	directoryrrrr*�szPackageTest._createDirectoryNcCs.t�|dkr|��}||_|�|j|�dSr!)r	�mktemp�parentr0r)rr-rrr�setUp�s
zPackageTest.setUpcCs|��dSr!)r(rrrr�tearDown�szPackageTest.tearDown)r)N)�__name__�
__module__�__qualname__�	dosModule�
testModule�
testSample�testInheritanceSamplerrr r(r0r*r6r7rrrrres0�

rc@s&eZdZddd�Zdd�Zdd�ZdS)	�SysPathManglingTestNcCs`t�tjdd�|_tjdd�|_|dkr6|��}t�||�|j�|j	�|�
|j�dSr!)r	r$r�oldPathZnewPathr4rr6�appendr5�
mangleSysPath)rr5rrrr6�szSysPathManglingTest.setUpcCst�|�|�|j�dSr!)rr7rBr@rrrrr7�s
zSysPathManglingTest.tearDowncCs|tjdd�<dSr!)r$r)rZpathVarrrrrB�sz!SysPathManglingTest.mangleSysPath)N)r8r9r:r6r7rBrrrrr?�s
r?)�__doc__Z
__future__rrr$rZtwisted.python.compatrZ
twisted.trialr�	importlibrr	r<�replacer;r=r>ZSynchronousTestCaserr?rrrr�<module>s)K