bg|ddlZddlmZddlmZddlmZmZddlm Z Gdde eZ Gd d e Z dS) N)call)TestCase) OutputCapturecompare) CompareHelpercDeZdZdZdZdZdZdZdZdZ dZ d Z d S) TestOutputCapturect5}tddddn #1swxYwY|ddS)N Bar! zBar!)rprintrselfos v/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/testfixtures/tests/test_outputcapture.pytest_compare_stripsz%TestOutputCapture.test_compare_strips s __  (OOO                &s +//ctd5}tddddn #1swxYwY|d|jddS)NF)strip_whitespacer z Bar!z*'\tBar!' (expected) != ' Bar! \n' (actual))rmessage)rr check_raisesrrs rtest_compare_doesnt_stripz+TestOutputCapture.test_compare_doesnt_strips E 2 2 2 a (OOO                 IB      s -11cTt5}tdtjtdtjtdtjtdtjdddn #1swxYwY|ddS)Nhellofileouttherenowzhello out there now rr sysstdoutstderrrrs rtest_stdout_and_stderrz(TestOutputCapture.test_stdout_and_stderrs __ * ' + + + + %cj ) ) ) ) ' + + + + %cj ) ) ) )  * * * * * * * * * * * * * * * ,-----sA-BB B ct5}tdtjdddn #1swxYwY|ddS)Nu日ru日 )rr r r!rrs r test_unicodezTestOutputCapture.test_unicode!s __ . )#* - - - - . . . . . . . . . . . . . . . +s 7;;c\td5}tdtjtdtjtdtjtdtjdddn #1swxYwY|dd dS) NTseparaterrrrrz hello there zout now r!r"rrs rtest_separate_capturez'TestOutputCapture.test_separate_capture&s D ) ) ) *Q ' + + + + %cj ) ) ) ) ' + + + + %cj ) ) ) )  * * * * * * * * * * * * * * * )%  ' ' ' ' 'sA-B  BBctd5}tdtjtdtjdddn #1swxYwY|dd|jd dS) NTr'rrrzout zhello adict not as expected: values differ: 'stderr': 'hello' (expected) != 'out' (actual) 'stdout': 'out' (expected) != 'hello' (actual) While comparing ['stderr']: 'hello' (expected) != 'out' (actual) While comparing ['stdout']: 'out' (expected) != 'hello' (actual))r!r"rr)rr r r!r"rrrs rtest_compare_both_at_oncez+TestOutputCapture.test_compare_both_at_once/s D ) ) ) *Q ' + + + + %cj ) ) ) ) * * * * * * * * * * * * * * * IS      s7AAActjtj}}t5}|tj|u|tj|udddn #1swxYwY|tj|u|tj|udSN)r r!r"r assertFalse assertTruero_outo_errrs rtest_original_restorez'TestOutputCapture.test_original_restoreDsz3:u __ 2   SZ50 1 1 1   SZ50 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2  e+,,,  e+,,,,,sAA66A:=A:ctjtj}}t5}|tj|u|tj|u||tj|u|tj|u||tj|u|tj|udddn #1swxYwY|tj|u|tj|udSr.)r r!r"rr/disabler0r1s rtest_double_disablez%TestOutputCapture.test_double_disableLsYz3:u __ 1   SZ50 1 1 1   SZ50 1 1 1 IIKKK OOCJ%/ 0 0 0 OOCJ%/ 0 0 0 IIKKK OOCJ%/ 0 0 0 OOCJ%/ 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  e+,,,  e+,,,,,sC/D""D&)D&c tjtj}}t5}||tj|u|tj|u||tj|u|tj|u||tj|u|tj|udddn #1swxYwY|tj|u|tj|udSr.)r r!r"rr6r0enabler/r1s rtest_double_enablez$TestOutputCapture.test_double_enableZsjz3:u __ 2 IIKKK OOCJ%/ 0 0 0 OOCJ%/ 0 0 0 HHJJJ   SZ50 1 1 1   SZ50 1 1 1 HHJJJ   SZ50 1 1 1   SZ50 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2  e+,,,  e+,,,,,sDD66D:=D:N) __name__ __module__ __qualname__rrr#r%r*r,r4r7r:rr r s    ... '''   *--- - - - - - - - -r?r ceZdZdZdZdS) TestOutputCaptureWithDescriptorscv|5td5}ttjddgttjddgdddn #1swxYwYdddn #1swxYwYt |jd|ddS)NT)fd-c#import sys; sys.stdout.write('out')#import sys; sys.stderr.write('err')outerrexpecteddisabledrrr executablercapturedrcapfdrs rtest_fdz(TestOutputCaptureWithDescriptors.test_fdlsK ^^   P P}555 P #.$(MN O O O #.$(MN O O O P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P  X.... 8 $$$$$s4B9A+ B+A/ /B2A/ 3BB Bcz|5tdd5}ttjddgttjddgdddn #1swxYwYdddn #1swxYwYt |jd|dd dS) NT)rCr(rDrErFrHrerrr)rJrNs rtest_fd_separatez1TestOutputCaptureWithDescriptors.test_fd_separatessO ^^   P P}tDDD P #.$(MN O O O #.$(MN O O O P P P P P P P P P P P P P P P P P P P P P P P P P P P P P P  R(((( u -----s4B9A, B,A0 0B3A0 4BB BN)r;r<r=rPrTr>r?rrArAjs2%%%.....r?rA) r subprocessrunittestr testfixturesrr test_comparerr objectrAr>r?rrZs ////////''''''^-^-^-^-^- x^-^-^-B.....v.....r?