/usr/lib64/python3.9/unittest/__pycache__
NameSizeModeActions
async_case.cpython-39.opt-1.pyc45790644editdlrm
async_case.cpython-39.opt-2.pyc45790644editdlrm
async_case.cpython-39.pyc47710644editdlrm
case.cpython-39.opt-1.pyc481180644editdlrm
case.cpython-39.opt-2.pyc331340644editdlrm
case.cpython-39.pyc481670644editdlrm
loader.cpython-39.opt-1.pyc144270644editdlrm
loader.cpython-39.opt-2.pyc117420644editdlrm
loader.cpython-39.pyc145180644editdlrm
main.cpython-39.opt-1.pyc75300644editdlrm
main.cpython-39.opt-2.pyc73520644editdlrm
main.cpython-39.pyc75300644editdlrm
mock.cpython-39.opt-1.pyc779920644editdlrm
mock.cpython-39.opt-2.pyc585810644editdlrm
mock.cpython-39.pyc780190644editdlrm
result.cpython-39.opt-1.pyc79590644editdlrm
result.cpython-39.opt-2.pyc60900644editdlrm
result.cpython-39.pyc79590644editdlrm
runner.cpython-39.opt-1.pyc71890644editdlrm
runner.cpython-39.opt-2.pyc65740644editdlrm
runner.cpython-39.pyc71890644editdlrm
signals.cpython-39.opt-1.pyc22420644editdlrm
signals.cpython-39.opt-2.pyc22420644editdlrm
signals.cpython-39.pyc22420644editdlrm
suite.cpython-39.opt-1.pyc101040644editdlrm
suite.cpython-39.opt-2.pyc90880644editdlrm
suite.cpython-39.pyc101040644editdlrm
util.cpython-39.opt-1.pyc43860644editdlrm
util.cpython-39.opt-2.pyc36660644editdlrm
util.cpython-39.pyc44380644editdlrm
_log.cpython-39.opt-1.pyc25230644editdlrm
_log.cpython-39.opt-2.pyc23580644editdlrm
_log.cpython-39.pyc25230644editdlrm
__init__.cpython-39.opt-1.pyc33980644editdlrm
__init__.cpython-39.opt-2.pyc16370644editdlrm
__init__.cpython-39.pyc33980644editdlrm
__main__.cpython-39.opt-1.pyc4010644editdlrm
__main__.cpython-39.opt-2.pyc3680644editdlrm
__main__.cpython-39.pyc4010644editdlrm
Edit: /usr/lib64/python3.9/unittest/__pycache__/loader.cpython-39.pyc (14518B)
a ´i®Xã@sdZddlZddlZddlZddlZddlZddlZddlZddlmZm Z ddl m Z m Z m Z dZe dej¡ZGdd „d e jƒZd d „Zd d „Zdd„Zdd„Zdd„ZGdd„deƒZeƒZddd„Ze jdfdd„Zde je jfdd„Z de je jfdd„Z!dS) zLoading unittests.éN)ÚfnmatchÚ fnmatchcaseé)ÚcaseÚsuiteÚutilTz[_a-z]\w*\.py$cs,eZdZdZ‡fdd„Z‡fdd„Z‡ZS)Ú _FailedTestNcs||_tt|ƒ |¡dS©N)Ú _exceptionÚsuperrÚ__init__)ÚselfZ method_nameÚ exception©Ú __class__©ú'/usr/lib64/python3.9/unittest/loader.pyr sz_FailedTest.__init__cs*|ˆjkrttˆƒ |¡S‡fdd„}|S)Ncs ˆj‚dSr )r r©r rrÚ testFailure!sz,_FailedTest.__getattr__..testFailure)Ú_testMethodNamer rÚ __getattr__)r Únamerrrrrs  z_FailedTest.__getattr__)Ú__name__Ú __module__Ú __qualname__rr rÚ __classcell__rrrrrs rcCs"d|t ¡f}t|t|ƒ||ƒS)Nz#Failed to import test module: %s %s)Ú tracebackÚ format_excÚ_make_failed_testÚ ImportError)rÚ suiteClassÚmessagerrrÚ_make_failed_import_test&sÿr"cCsdt ¡f}t||||ƒS)NzFailed to call load_tests: %s)rrr)rrr r!rrrÚ_make_failed_load_tests+sÿr#cCst||ƒ}||fƒ|fSr )r)Ú methodnamerr r!Útestrrrr0s rcCs<t t|ƒ¡dd„ƒ}||i}tdtjf|ƒ}|||ƒfƒS)NcSsdSr rrrrrÚ testSkipped5sz'_make_skipped_test..testSkippedZ ModuleSkipped)rÚskipÚstrÚtypeÚTestCase)r$rr r&ÚattrsZ TestClassrrrÚ_make_skipped_test4s   r,cCs*| ¡ d¡r|dd…Stj |¡dS)Nz $py.classi÷ÿÿÿr)ÚlowerÚendswithÚosÚpathÚsplitext)r0rrrÚ_jython_aware_splitext<s r2cs¬eZdZdZdZeejƒZdZ e j Z dZ ‡fdd„Zdd„Zddœd d „Zd!d d „Zd"d d„Zdd„Zd#dd„Zdd„Zdd„Zdd„Zdd„Zd$dd„Zd%dd „Z‡ZS)&Ú TestLoaderz� This class is responsible for loading tests according to various criteria and returning them wrapped in a TestSuite r%Ncs tt|ƒ ¡g|_tƒ|_dSr )r r3r ÚerrorsÚsetÚ_loading_packagesrrrrr MszTestLoader.__init__cCsFt|tjƒrtdƒ‚| |¡}|s2t|dƒr2dg}| t||ƒ¡}|S)z;Return a suite of all test cases contained in testCaseClasszYTest cases should not be derived from TestSuite. Maybe you meant to derive from TestCase?ZrunTest)Ú issubclassrÚ TestSuiteÚ TypeErrorÚgetTestCaseNamesÚhasattrr Úmap)r Ú testCaseClassZ testCaseNamesZ loaded_suiterrrÚloadTestsFromTestCaseTs  z TestLoader.loadTestsFromTestCase©Úpatternc Os8t|ƒdksd|vr,t dt¡| dd¡t|ƒdkrRt|ƒd}td |¡ƒ‚t|ƒdkrxt|ƒd}td |¡ƒ‚g}t|ƒD]4}t ||ƒ}t |t ƒr„t |t jƒr„| | |¡¡q„t |ddƒ} | |¡}| du�r4z| |||ƒWSt�y2} z0t|j| |jƒ\} } |j | ¡| WYd} ~ Sd} ~ 00|S) z>Return a suite of all test cases contained in the given modulerZuse_load_testsz(use_load_tests is deprecated and ignoredNrzCloadTestsFromModule() takes 1 positional argument but {} were givenz=loadTestsFromModule() got an unexpected keyword argument '{}'Ú load_tests)ÚlenÚwarningsÚwarnÚDeprecationWarningÚpopr9ÚformatÚsortedÚdirÚgetattrÚ isinstancer)r7rr*Úappendr>r Ú Exceptionr#rr4) r Úmoduler@ÚargsÚkwsZ complaintÚtestsrÚobjrAÚeÚ error_caseÚ error_messagerrrÚloadTestsFromModulebs8ÿ           ÿ zTestLoader.loadTestsFromModulec Cs`| d¡}d\}}|dur–|dd…}|rŠzd |¡}t|ƒ}WqŠWq&ty†| ¡}t||jƒ\}}|s‚|j |¡|YSYq&0q&|dd…}|} |D]º} z| t | | ƒ} } Wqžt �yV} z†t | ddƒdu�r|du�r|j |¡|WYd} ~ St | | |jdt   ¡fƒ\}}|j |¡|WYd} ~ SWYd} ~ qžd} ~ 00qžt| tjƒ�rr| | ¡St| tƒ�r–t| tjƒ�r–| | ¡St| tjƒ�rðt| tƒ�rðt| tjƒ�rð|d}| |ƒ} tt | |ƒtjƒ�s| | g¡Snt| tjƒ�r| St| ƒ�rP| ƒ}t|tjƒ�r$|St|tjƒ�r>| |g¡Std| |fƒ‚n td | ƒ‚dS) aSReturn a suite of all test cases given a string specifier. The name may resolve either to a module, a test case class, a test method within a test case class, or a callable object which returns a TestCase or TestSuite instance. The method optionally resolves the names relative to a given module. Ú.)NNNrÚ__path__zFailed to access attribute: %séÿÿÿÿz"calling %s returned %s, not a testz$don't know how to make test from: %s)ÚsplitÚjoinÚ __import__rrFr"r r4rLrJÚAttributeErrorrrrrKÚtypesÚ ModuleTyperVr)r7rr*r>Ú FunctionTyperr8Úcallabler9)r rrNÚpartsrTrUZ parts_copyÚ module_nameZnext_attributerRÚpartÚparentrSÚinstr%rrrÚloadTestsFromNameŠsz    ÿ  ÿ ÿþ ,  ÿ þ  ÿzTestLoader.loadTestsFromNamecs‡‡fdd„|Dƒ}ˆ |¡S)z�Return a suite of all test cases found using the given sequence of string specifiers. See 'loadTestsFromName()'. csg|]}ˆ |ˆ¡‘qSr)rg)Ú.0r©rNr rrÚ Üóz1TestLoader.loadTestsFromNames..)r )r ÚnamesrNZsuitesrrirÚloadTestsFromNamesØszTestLoader.loadTestsFromNamescs>‡‡fdd„}tt|tˆƒƒƒ}ˆjr:|jt ˆj¡d�|S)zLReturn a sorted sequence of method names found within testCaseClass csZ| ˆj¡sdStˆ|ƒ}t|ƒs&dSdˆjˆj|f‰ˆjdupXt‡fdd„ˆjDƒƒS)NFz%s.%s.%sc3s|]}tˆ|ƒVqdSr )r)rhr@©ZfullNamerrÚ ìrkzKTestLoader.getTestCaseNames..shouldIncludeMethod..)Ú startswithÚtestMethodPrefixrJrarrÚtestNamePatternsÚany)ÚattrnameZtestFunc©r r=rnrÚshouldIncludeMethodâs   ÿ ÿz8TestLoader.getTestCaseNames..shouldIncludeMethod)Úkey)ÚlistÚfilterrIÚsortTestMethodsUsingÚsortÚ functoolsÚ cmp_to_key)r r=rvZ testFnNamesrrurr:ßs  zTestLoader.getTestCaseNamesútest*.pyc CsDd}|dur|jdur|j}n|dur.d}|}tj |¡}|tjvrRtj d|¡||_d}d}g}tj tj |¡¡r¨tj |¡}||kr¤tj tj |d¡¡ }�njz t |ƒWnt yÌd}Y�nF0tj |}|  d¡d} ztj tj  |j¡¡}WnÞt�yÞz |j} Wnt�y2d} Yn0| �r°| jdu�r°| jdu�rÚd}|jD]P} |�sv|  |¡�sv�q\|   |j dtjj¡¡d|_| |j| |dd�¡�q\n*|jtjv�rÊtdƒd‚ntd  |¡ƒd‚Yn0|�r|�s| | ¡|_tj |¡n tj |¡|�r$t d |ƒ‚|�s:t| ||¡ƒ}|  |¡S) a%Find and return all test modules from the specified start directory, recursing into subdirectories to find them and return all tests found within them. Only test files that match the pattern will be loaded. (Using shell style pattern matching.) All test modules must be importable from the top level of the project. If the start directory is not the top level directory then the top level directory must be specified separately. If a test package name (directory with '__init__.py') matches the pattern then the package will be checked for a 'load_tests' function. If this exists then it will be called with (loader, tests, pattern) unless the package has already had load_tests called from the same discovery invocation, in which case the package module object is not scanned for tests - this ensures that when a package uses discover to further discover child tests that infinite recursion does not happen. If load_tests exists then discovery does *not* recurse into the package, load_tests is responsible for loading all tests in the package. The pattern is deliberately not stored as a loader attribute so that packages can continue discovery themselves. top_level_dir is stored so load_tests does not need to pass this argument in to loader.discover(). Paths are sorted before being imported to ensure reproducible execution order even on filesystems with non-alphabetical ordering like ext3/4. FNTrú __init__.pyrW)Ú namespacez2Can not use builtin modules as dotted module namesz$don't know how to discover from {!r}z%Start directory is not importable: %r)!Ú_top_level_dirr/r0ÚabspathÚsysÚinsertÚisdirÚisfiler[r\rÚmodulesrZÚdirnameÚ__file__r]Ú__spec__ÚloaderÚsubmodule_search_locationsrXrprÚreplaceÚsepÚextendÚ _find_testsÚbuiltin_module_namesr9rGÚ _get_directory_containing_moduleÚremoverxr ) r Ú start_dirr@Z top_level_dirZset_implicit_topZis_not_importableÚ is_namespacerQZ the_moduleZtop_partÚspecr0rrrÚdiscoveròs�        ÿ    ÿ ÿÿÿ þÿÿÿþÿ  zTestLoader.discovercCsRtj|}tj |j¡}tj |¡ ¡ d¡rBtj  tj  |¡¡Stj  |¡SdS)Nr) rƒr‡r/r0r‚r‰Úbasenamer-rprˆ)r rcrNÚ full_pathrrrr’`s  z+TestLoader._get_directory_containing_modulecCsh||jkrdSttj |¡ƒ}tj ||j¡}tj |¡rBJdƒ‚| d¡rTJdƒ‚| tjj d¡}|S)NrWzPath must be within the projectz..) r�r2r/r0ÚnormpathÚrelpathÚisabsrpr�rŽ)r r0Z_relpathrrrrÚ_get_name_from_pathls zTestLoader._get_name_from_pathcCst|ƒtj|Sr )r\rƒr‡)r rrrrÚ_get_module_from_namexsz TestLoader._get_module_from_namecCs t||ƒSr )r)r r0r™r@rrrÚ _match_path|szTestLoader._match_pathFc csÜ| |¡}|dkrD||jvrD| |||¡\}}|dur<|V|sDdStt |¡ƒ}|D]€}tj ||¡} | | ||¡\}}|durˆ|V|rV| | ¡}|j |¡z$|  | ||¡EdHW|j  |¡qV|j  |¡0qVdS)z/Used by discovery. Yields test suites it loads.rWN) r�r6Ú_find_test_pathrHr/Úlistdirr0r[Úaddr�Údiscard) r r”r@r€rrQZshould_recurseÚpathsr0r™rrrr�€s. ÿÿ  zTestLoader._find_testsc Cs„tj |¡}tj |¡�rTt |¡s(dS| |||¡s:dS| |¡}z| |¡}Wnft j yŠ}zt |||j ƒdfWYd}~Sd}~0t ||j ƒ\}} |j | ¡|dfYS0tj t|d|ƒ¡} ttj | ¡ƒ} ttj |¡ƒ} |  ¡|  ¡k�r>tj | ¡} ttj |¡ƒ}tj |¡}d}t||| |fƒ‚|j||d�dfS�n,tj |¡�r||�s„tj tj |d¡¡�s„dSd}d}| |¡}z| |¡}Wnht j �yÞ}zt |||j ƒdfWYd}~Sd}~0t ||j ƒ\}} |j | ¡|dfYS0t|ddƒ}|j |¡zD|j||d�}|du�rV|dfW|j |¡S|d fW|j |¡S|j |¡0ndSdS) zÉUsed by discovery. Loads tests from a single file, or a directories' __init__.py when passed the directory. Returns a tuple (None_or_tests_from_file, should_recurse). )NFFNr‰zW%r module incorrectly imported from %r. Expected %r. Is this module globally installed?r?rrAT)r/r0r˜r†ÚVALID_MODULE_NAMEÚmatchrŸr�ržrZSkipTestr,r r"r4rLr‚rJr2Úrealpathr-rˆrrVr…r[r6r¢r£)r r™r@r€r˜rrNrSrTrUZmod_filer§Zfullpath_noextZ module_dirÚmod_nameZ expected_dirÚmsgrArQÚpackagerrrr ¢s„   & ÿ  ÿ ÿ ÿ  ÿ  ÿÿ & ÿ     ý þzTestLoader._find_test_path)N)N)r~N)F)F)rrrÚ__doc__rqÚ staticmethodrÚ three_way_cmprzrrrr8r r�r r>rVrgrmr:r—r’r�ržrŸr�r rrrrrr3Bs&  ( N  n   "r3cCs&tƒ}||_||_||_|r"||_|Sr )r3rzrqrrr )ÚprefixÚ sortUsingr rrr‹rrrÚ _makeLoaderñsr°cCst|||d� |¡S)N)rr)r°r:)r=r®r¯rrrrrr:úsr:r%cCst|||ƒ |¡Sr )r°r>)r=r®r¯r rrrÚ makeSuiteýs ÿr±cCst|||ƒ |¡Sr )r°rV)rNr®r¯r rrrÚ findTestCasess ÿr²)NN)"r«r/Úrerƒrr^r|rCrrÚrrrZ __unittestÚcompileÚ IGNORECASEr¥r*rr"r#rr,r2Úobjectr3ZdefaultTestLoaderr°r­r:r8r±r²rrrrÚs</ ÿ ÿ