bgB>ddlmZddlmZmZGddeZdS))TestCase)Replacer ShouldRaisecDeZdZdZdZdZdZdZdZdZ dZ d Z d S) TestReplacerc$ddlm}|dksJd}t}|d||dksJ||dksJdS)Nrsample1 original zcdSN replacement zrq/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/testfixtures/tests/test_replacer.pytest_zz*TestReplacer.test_function..test_z  rtestfixtures.tests.sample1.zr)testfixtures.testsr zrreplacerestoreselfr rrs r test_functionzTestReplacer.test_functions......yy{{l**** ! ! ! JJ 0888yy{{o---- yy{{l******rcddlm}|}|jjdksJGdd|j}t }|d||}|jjdksJ|dksJ||}|jjdksJdS)Nrr XceZdZdS)-TestReplacer.test_class..XReplacementN)__name__ __module__ __qualname__rrr XReplacementr srr$ztestfixtures.tests.sample1.X original y) rr r __class__r!rryr)rr xr$rs r test_classzTestReplacer.test_classs...... IIKK{#s****+++++79+++ JJ 0,??? IIKK{#~5555yy{{}},.... IIKK{#s******rcddlm}|dksJd}t }|d||dddksJ||dksJdS)Nrr r%cdS)N replacement yrrs rtest_yz(TestReplacer.test_method..test_y/rrtestfixtures.tests.sample1.X.y&r,)rr rr'rrr)rr r.rs r test_methodzTestReplacer.test_method+s......yy{{}},.... ! ! ! JJ 26:::yy{{}}ss#6666 yy{{}},......rcddlm}|j}|j|usJd}t }|d||j|j|dfksJ||j|j|usJdS)Nrr c |dfS)Nr)clss rrMethodz/TestReplacer.test_class_method..rMethod@s a-rz$testfixtures.tests.sample1.X.aMethodr4)rr raMethodrrr)rr cr6rs rtest_class_methodzTestReplacer.test_class_method;s...... Iy  ""a''''    JJ 8AAA y  ""q!f,,,,  y  ""a''''''rc^ddlm}|dksJ|dksJd}d}t }|d||d||d ksJ|d ksJ||dksJ|dksJdS) Nrr r r%c|jjSN)r&r!r-s rr.z2TestReplacer.test_multiple_replace..test_ySs ( (rcdSr rrrrrz2TestReplacer.test_multiple_replace..test_zUrrrr/rr)rr rrr'rrr)rr r.rrs rtest_multiple_replacez"TestReplacer.test_multiple_replaceNs(......yy{{l****yy{{}},.... ) ) ) ! ! ! JJ 0888 26:::yy{{o----yy{{}}#%%%% yy{{l****yy{{}},......rc0ddlm}ddlm}|dksJd}t }|d||dksJ|dksJ|dS)Nrr )sample2r cdSr rrrrrz(TestReplacer.test_gotcha..test_zkrrrr)rr r@rrrr)rr r@rrs r test_gotchazTestReplacer.test_gotchads /...........yy{{l**** ! ! ! JJ 0888yy{{o----yy{{l**** rcddlm}d}t}|d|||dksJ||dksJdS)Nrr cdSr<rrrrrz5TestReplacer.test_remove_called_twice..test_z|rrr )rr rrrrrs rtest_remove_called_twicez%TestReplacer.test_remove_called_twiceys...... JJ 0888 yy{{l**** yy{{l******rc.ddlm}|dksJd}t5}|d||dksJ dddn #1swxYwY|dksJdS)Nrr r cdSr rrrrrz0TestReplacer.test_with_statement..test_zrrrr)rr rrrrs rtest_with_statementz TestReplacer.test_with_statements......yy{{l**** ! ! !ZZ 21 II4V < < <99;;/11111 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2yy{{l******s1A00A47A4cd}t5}ttd5|d|dddn #1swxYwYddddS#1swxYwYdS)NcdSr<rrrrtest_badz-TestReplacer.test_not_there..test_badrErzOriginal 'bad' not foundztestfixtures.tests.sample1.bad)rrAttributeErrorr)rrLrs rtest_not_therezTestReplacer.test_not_theres ZZ F1^,FGGHH F F :HEEE F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F Fs4A*A A*A A*A A**A.1A.N) r!r"r#rr)r1r9r>rBrFrIrNrrrrrs+++ +++&/// (((&///,* + + + + + +FFFFFrrN)unittestr testfixturesrrrrrrrQsw........SFSFSFSFSF8SFSFSFSFSFr