bgvddlmZddlmZddlmZddlmZddlm Z m Z m Z ddl mZmZGddeZd S) )dedent)TestCase)Mock)Document)compare Comparison TempDirectory) FileParser FileBlockcJeZdZdZdZdZdZdZdZdZ dZ d Z d Z d S) TestFileParserc tt|d}ttdt d|D|dS)Nz /dev/null)pathc3$K|] }|jV dS)N)parsed).0rs n/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/testfixtures/tests/test_sybil.py z0TestFileParser.check_document..s$77a777777tdexpected)rrrlistr )selftextrds rcheck_documentzTestFileParser.check_document sk VD\\ 4 4 4 77#3:d#3#3A#6#6777 7 7      rc |dttdddttdddg dS) Nas .. topic:: file.txt :class: write-file line 1 line 2 line 3 .. topic:: file2.txt :class: read-file line 4 line 5 line 6 file.txtline 1 line 2 line 3 writercontentactionz file2.txtzline 4 line 5 line 6 readrrrCr rs rtest_multiple_filesz"TestFileParser.test_multiple_filessq *)!6 """)"6!!! +      rc b|dttdddgdS)Nz .. topic:: file.txt :class: write-file :: line 1 line 2 line 3 r r!r"r#r'r(r*s rtest_ignore_literal_blockingz+TestFileParser.test_ignore_literal_blocking5sR  )!6 """      rc b|dttdddgdS)Nz .. topic:: file.txt :class: write-file print("hello") out = 'there' foo = 'bar' This is just some normal text! r z*print("hello") out = 'there' foo = 'bar' r"r#r'r(r*s rtest_file_followed_by_textz)TestFileParser.test_file_followed_by_textIsU  )!A """      rc4|dgdS)Nz .. topic:: file.txt :class: not-a-file print "hello" out = 'there' r'rr*s rtest_red_herringzTestFileParser.test_red_herring_s3   rc4|dgdS)Nz .. topic:: file.txt print "hello" out = 'there' r'r1r*s r test_no_classzTestFileParser.test_no_classls3   rc td}t||t|d|idddS)Nrz /the/file*)r namespacerline)actual)r revaluater)rdirblockrparsers rcheck_evaluatezTestFileParser.check_evaluatexscD!!Sk 2 2 2 " "       rc t5}|dd||tddddddddS#1swxYwYdS)Nfooscontentr$r&r)r r"r>r rr;s rtest_evaluate_read_samez&TestFileParser.test_evaluate_read_sames __  IIeZ ( ( (   %F33                      s>AA!Ac t5}|dd||tdddd|jddddS#1swxYwYdS)Nr@sactualrr&zW--- File '/the/file', line 42: +++ Reading from "{}/foo": @@ -1 +1 @@ -expected +actualr)r r"r>r formatrrAs rtest_evaluate_read_differencez,TestFileParser.test_evaluate_read_differences __  IIeY ' ' '   %V44 &""                     sAA22A69A6c t5}||tdddd|dgt|dddddddS#1swxYwYdS)Nr@r$r"rascii)r r>r rr&rAs rtest_evaluate_writez"TestFileParser.test_evaluate_writes __ 9   %G44     KK CHHUG,,i 8 8 8 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9sA"A>>BBN) __name__ __module__ __qualname__rr+r-r/r2r4r>rBrErHrrr r s   B(,              99999rr N)textwraprunittestrtestfixtures.mockrsybil.documentr testfixturesrrr)r testfixtures.sybilr r r rLrrrSs""""""######@@@@@@@@@@44444444V9V9V9V9V9XV9V9V9V9V9r