Ǒ v d dl mZ d dlmZ d dlmZ d dlmZ d dlm Z m
ZmZ d dl
mZmZ G d de Zd S )
)dedent)TestCase)Mock)Document)compare
Comparison
TempDirectory)
FileParser FileBlockc J e Zd Zd Zd Zd Zd Zd Zd Zd Z d Z
d Zd
ZdS )TestFileParserc t t | d }t t d t d | D | d S )Nz /dev/null)pathc 3 $ K | ]}|j V d S )N)parsed).0rs o/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/testfixtures/tests/test_sybil.py z0TestFileParser.check_document.. s$ 77a777777 tdexpected)r r r listr
)selftextr ds r check_documentzTestFileParser.check_document
sk VD\\44477#3:d#3#3A#6#677777
r c
| dt t ddd t t ddd g d S )
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
writer contentactionz file2.txtzline 4
line 5
line 6
readr r r Cr r s r test_multiple_filesz"TestFileParser.test_multiple_files sq * )!6 " " " )"6! ! ! + r c b | dt t ddd g d S )Nz
.. topic:: file.txt
:class: write-file
::
line 1
line 2
line 3
r r! r" r# r' r( r* s r test_ignore_literal_blockingz+TestFileParser.test_ignore_literal_blocking5 sR
)!6 " " " r c b | dt t ddd g d S )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 r test_file_followed_by_textz)TestFileParser.test_file_followed_by_textI sU )!A " " " r c 4 | dg d S )Nz
.. topic:: file.txt
:class: not-a-file
print "hello"
out = 'there'
r' r r* s r test_red_herringzTestFileParser.test_red_herring_ s3
r c 4 | dg d S )Nz
.. topic:: file.txt
print "hello"
out = 'there'
r' r1 r* s r
test_no_classzTestFileParser.test_no_classl s3
r c t d }t || t |d|idd d S )Nr z /the/file* )r namespacer line)actual)r
r evaluater )r dirblockr parsers r check_evaluatezTestFileParser.check_evaluatex sc D!!Sk 2
2
2
" " r c t 5 }| dd | |t ddd d d d d d S # 1 swxY w Y d S )Nfoos contentr$ r&