Files
vault-para/tests/__pycache__/test_interfaces.cpython-314-pytest-9.0.2.pyc
T

238 lines
31 KiB
Plaintext
Raw Normal View History

+
%cTil cóRt^RIt^RIHuHt^RIt^RIH t ^RI
H t H t H
t
HtHtHtHtHt^RIHtHtHtHtHtHtHt!RR]4t!RR]4t!R R
]4t!R R ]4t!R
R4t!RR4t R#)z-Unit tests for core interfaces and protocols.N)ÚList)Ú
FileDiscoveryÚContentAnalyzerÚ TagGeneratorÚFrontmatterManagerÚBaseFileDiscoveryÚBaseContentAnalyzerÚBaseTagGeneratorÚBaseFrontmatterManager)ÚFileInfoÚContentAnalysisÚ TagStructureÚFrontmatterDataÚValidationResultÚ ContentTypeÚ LanguageInfocóZa]tRt^toRtV3RlRltV3RlRltV3RlRltRtVt R #)
ÚMockFileDiscoveryz1Mock implementation of FileDiscovery for testing.có6<V^8„dQhRS[RS[S[,/#)éÚpathÚreturn)Ústrrr
)ÚformatÚ
__classdict__s"€Ú0D:\tmp\vault\vault-para\tests\test_interfaces.pyÚ __annotate__ÚMockFileDiscovery.__annotate__sø€÷

ñ

¡3ð

©4±­

óc
 ór^RIHp\V R2RVR^dVP4VP4R7.#)zMock directory scanning.)Údatetimez/test.mdútest.mdú.md)rÚnameÚ directoryÚ extensionÚsizeÚcreatedÚmodified)rr
Únow)Úselfrrs&& rÚscan_directoryÚ MockFileDiscovery.scan_directorys?å Øv˜XÐØØØØ Ÿ Øô
ð

ð
rcó\<V^8„dQhRS[S[,RS[S[,RS[S[,/#)rÚfilesÚtypesr)rr
r)rrs"€rrr,s.ø€÷:¡D©¥Nð:¹4Á½9ðÉhÍñ:rc óTVUu.uFq3PV9gKVNK up#uupi)zMock file filtering.)r$)r)r-r.Úfs&&& rÚfilter_by_typeÚ MockFileDiscovery.filter_by_type,s%á Ó9™5a§K¡K°5Ñ$8—™5Ñ9ùÒ9s%œ%cóF<V^8„dQhRS[S[,RS[S[,/#)rr-r)rr
)rrs"€rrr0s#ø€÷?¡t©H¥~ð?¹$¹x½.ñ?rc óVVUu.uFpRVP9gKVNK up#uupi)zMock sensitive file exclusion.Ú sensitive)r)r)r-r0s&& rÚexclude_sensitiveÚ#MockFileDiscovery.exclude_sensitive0s'á Ó>™5a K°q·v±vÑ$=—™5Ñ>ùÒ>s&&©N)
Ú__name__Ú
__module__Ú __qualname__Ú__firstlineno__Ú__doc__r*r1r6Ú__static_attributes__Ú__classdictcell__©rs@rrrs&ø‡Ù

ð

÷?rrcóla]tRt^5toRtV3RlRltV3RlRltV3RlRltV3RlR ltR
t Vt
R #) ÚMockContentAnalyzerz3Mock implementation of ContentAnalyzer for testing.có&<V^8„dQhRS[RS[/#©rÚcontentr)rr )rrs"€rrÚ MockContentAnalyzer.__annotate__8sø€÷
ñ
¡sð
©ñ
rc
 ój\\P\PR.R.R.R.R./R7#)zMock content analysis.ÚtestÚtoolsÚ technologiesÚpeopleÚ
organizations)ÚlanguageÚ content_typeÚtopicsÚmentions)r rÚENGLISHrÚNOTE©r)rEs&&rÚanalyze_contentÚ#MockContentAnalyzer.analyze_content8s;äÜ!טr >°2°xÀÀ_ÐVXÐ
ð
rcó&<V^8„dQhRS[RS[/#rD©r)rrs"€rrrFAsø€÷ñ¡sð©sñrc óR#)zMock language detection.Úenr8rSs&&rÚdetect_languageÚ#MockContentAnalyzer.detect_languageAsárcó6<V^8„dQhRS[RS[S[,/#rD©rr)rrs"€rrrFEsø€÷ ñ ¡cð ©d±3­iñ rc ó
RR.#)zMock topic extraction.rHÚmockr8rSs&&rÚextract_topicsÚ"MockContentAnalyzer.extract_topicsEs
à˜ÐÐrcó,<V^8„dQhRS[RS[RS[/#)rrEÚfilenamerrW)rrs"€rrrFIs"ø€÷ñ©Sð¹CðÁCñrc óR#)z!Mock content type classification.Únoter8)r)rErcs&&&rÚclassify_content_typeÚ)MockContentAnalyzer.classify_content_typeIsárr8N) r9r:r;r<r=rTrZr`rfr>r?r@s@rrBrB5s0ø‡Ù
ð
÷ð÷ ð ÷örrBcóla]tRt^NtoRtV3RlRltV3RlRltV3RlRltV3RlR ltR
t Vt
R #) ÚMockTagGeneratorz0Mock implementation of TagGenerator for testing.có6<V^8„dQhRS[RS[S[,/#)rÚfilepathrr])rrs"€rrÚMockTagGenerator.__annotate__Qsø€÷ñ±ð¹¹S½ ñrc óRV9dR.#R.#)zMock directory tag generation.z 100-projectÚprojectÚunknownr8)r)rks&&rÚgenerate_directory_tagsÚ(MockTagGenerator.generate_directory_tagsQsà ˜  ؈{Ðrcó6<V^8„dQhRS[RS[S[,/#)rÚanalysisr)r rr)rrs"€rrrlWsø€÷ñ©oðÁ$ÁsÅ)ñrc óVP#)zMock content tag generation.)rO)r)rss&&rÚgenerate_content_tagsÚ&MockTagGenerator.generate_content_tagsWs àÐrcóF<V^8„dQhRS[S[,RS[S[,/#)rrOr©rr)rrs"€rrrl[s#ø€÷±cµð6¹tÁC½yñ6rc ó6VUu.uFpRV 2NK
up#uupi)z!Mock hierarchical tag generation.ztopic/r8)r)rOÚtopics&& rÚgenerate_hierarchical_tagsÚ+MockTagGenerator.generate_hierarchical_tags[s!á.4Ó5©f U&˜˜Ó ©fÑ5ùÒ5scóF<V^8„dQhRS[S[,RS[S[,/#)rÚtagsrrx)rrs"€rrrl_s#ø€÷ñ¡T©#¥Yð±4¹µ9ñrc ó*\\V44#)zMock tag consolidation.)ÚlistÚset)r)r~s&&rÚconsolidate_tagsÚ!MockTagGenerator.consolidate_tags_sä”C˜“IÐrr8N) r9r:r;r<r=rprur{rr>r?r@s@rririNs0ø‡Ùð÷ ð÷örricóZa]tRt^dtoRtV3RlRltV3RlRltV3RlRltRtVt R #)
ÚMockFrontmatterManagerz6Mock implementation of FrontmatterManager for testing.có&<V^8„dQhRS[RS[/#rD©rr
)rrs"€rrÚ#MockFrontmatterManager.__annotate__gsø€÷
ñ
©ð
±ñ
rc ó \RR.RR7#)zMock frontmatter parsing.ÚTestrHz
2024-01-01)Útitler~r&)r
rSs&&rÚparse_frontmatterÚ(MockFrontmatterManager.parse_frontmattergsäØØØ ô
ð
rcó,<V^8„dQhRS[RS[RS[/#)rrEÚupdatesrr‡)rrs"€rrrˆos'ø€÷TñT©#ðT¹ðTÉCñTrc ó@RVP RVP RV 2#)zMock frontmatter updating.z ---
title: z
tags: z
---
)rr~)r)rErs&&&rÚupdate_frontmatterÚ)MockFrontmatterManager.update_frontmatteros#à˜gŸm™m˜_¨H°W·\±\°NÀ'È'ÈÐSrcó&<V^8„dQhRS[RS[/#)rÚdatar)r
r)rrs"€rrrˆssø€÷ñ©ðÑ=Mñrc ód\RR7pVP'gVPR4V#)zMock frontmatter validation.T)Úis_validzTitle is required)rrÚ add_error)r)r”Úresults&& rÚvalidate_frontmatterÚ+MockFrontmatterManager.validate_frontmatterss)ä!¨4ÔØzzˆzØ × Ñ Ð ˆ
rr8N)
r9r:r;r<r=rr™r>r?r@s@rr…r…ds(ø‡Ù
ð
÷TðT÷örr…có<a]tRt^{toRtRtRtRtRtRt Vt
R#)ÚTestProtocolCompliancez5Test that mock implementations comply with protocols.c  óð \4p\V\4q"'Eg9RRR\P!49g!\
P !\4'd\
P!\4MRRR\P!49g\
P !V4'd\
P!V4MRRR\P!49g!\
P !\4'd\
P!\4MRR\
P!V4/,p\\
P!V44hR pVPR
4p\V4p^qeV8Hqw'Eg\
P!RV3RWV34RR \P!49g!\
P !\4'd\
P!\4MR RR \P!49g\
P !V4'd\
P!V4MR R
\
P!V4R\
P!V4/,pRRV/,p \\
P!V 44hR ;p;rvV^,qªPpRqeV8Hqw'g\
P!RV3RWV34R\
P!V
4R
\
P!V4R\
P!V4/,pRRV/,p \\
P!V 44hR ;p
;p;rvVPVR.4p \V 4p^qeV8Hqw'Eg\
P!RV3RWV34RR \P!49g!\
P !\4'd\
P!\4MR RR\P!49g\
P !V 4'd\
P!V 4MRR
\
P!V4R\
P!V4/,pRRV/,p \\
P!V 44hR ;p;rvVPV4p \V 4p^qeV8Hqw'Eg\
P!RV3RWV34RR \P!49g!\
P !\4'd\
P!\4MR RR\P!49g\
P !V 4'd\
P!V 4MRR
\
P!V4R\
P!V4/,pRRV/,p \\
P!V 44hR ;p;rvR #)z>Test that MockFileDiscovery implements FileDiscovery protocol.ú5assert %(py4)s
{%(py4)s = %(py0)s(%(py1)s, %(py2)s)
py0Ú
isinstanceÚpy1r_Úpy2rÚpy4NrHÚlenr-Úpy3Úpy6úassert %(py8)sÚpy8r r!ÚfilteredÚ
non_sensitive©ú==©z0%(py3)s
{%(py3)s = %(py0)s(%(py1)s)
} == %(py6)s)z,%(py3)s
{%(py3)s = %(py1)s.name
} == %(py6)s)rr rÚ @py_builtinsÚlocalsÚ
@pytest_arÚ_should_repr_global_nameÚ _safereprÚAssertionErrorÚ_format_explanationr*Ú_call_reprcomparer"r1r6)
r)r_Ú @py_assert3Ú @py_format5r-Ú @py_assert2Ú @py_assert5Ú @py_assert4Ú @py_format7Ú @py_format9Ú @py_assert0r©s
& rÚ'test_file_discovery_protocol_complianceÚ>TestProtocolCompliance.test_file_discovery_protocol_compliance~sä Ó"ˆä˜$¤
Ó.×.Œz×.Œz×.×.˜$×.˜$×.×
×.×.×
××# FÓÜ5‹zИQИQ‰×××Ôˆz×××××׌s×××ÒŒs××××××Ð××Ò×Öˆz××Ô˜Q×××××××ÒØQ)}‰}Ð)  Ð)  Ñ)×)×)×)ˆ}×)ˆx×)×)ˆ}×)×)  ×)×)×)×)×)××& u¨u¨gÓ6ˆÜ8ÐÑ!×!×!ˆ}×!Œs×!Œs×!×!×!×!×!×!8×!×!×!8×!×!ˆ}×!×××.¨uÓ
Ü& & &×&×&×!×&×&×&×&×&×&Œs×&×&×&Œs×&×&×&×&×&×&=×&×&×&=×&×!×&×& Q×&×&×&×&×&×&×&rc  óì \4p\V\4q"'Eg9RRR\P!49g!\
P !\4'd\
P!\4MRRR\P!49g\
P !V4'd\
P!V4MRRR\P!49g!\
P !\4'd\
P!\4MRR\
P!V4/,p\\
P!V44hR pVPR
4pVPp\PqeV8Hq"'Eg\
P!RV3RWV34RR \P!49g\
P !V4'd\
P!V4MR R\
P!V4RR \P!49g!\
P !\4'd\
P!\4MR R
\
P!V4/,pRRV/,p\\
P!V44hR ;p;r&VPp\ P"qeV8Hq"'Eg\
P!RV3RWV34RR \P!49g\
P !V4'd\
P!V4MR R\
P!V4RR\P!49g!\
P !\ 4'd\
P!\ 4MRR
\
P!V4/,pRRV/,p\\
P!V44hR ;p;r&VP%R
4p Rq©V
8HqU'\
P!RV3RWš34RR\P!49g\
P !V 4'd\
P!V 4MRR\
P!V
4/,p RRV /,p \\
P!V 44hR ;rZVP'R
4p
RqîV
9qª'\
P!RV
3R Wí34R\
P!V4RR\P!49g\
P !V
4'd\
P!V
4MR/,p RRV /,p \\
P!V 44hR ;rêVP)R
R4pRq¯V
8HqU'\
P!RV3RWú34RR\P!49g\
P !V4'd\
P!V4MRR\
P!V
4/,p RRV /,p \\
P!V 44hR ;rZR #)!zBTest that MockContentAnalyzer implements ContentAnalyzer protocol.ržr r_rNz test contentrsrrrYrMúassert %(py5)sÚpy5rHrOr rerN)zM%(py2)s
{%(py2)s = %(py0)s.language
} == %(py6)s
{%(py6)s = %(py4)s.ENGLISH
})zN%(py2)s
{%(py2)s = %(py0)s.content_type
} == %(py6)s
{%(py6)s = %(py4)s.NOTE
})z%(py0)s == %(py3)s©Úin©z%(py1)s in %(py3)s)rBr rr´rTrMrrQrNrrRrZr`rf)r)r_rsÚ @py_assert1r¹rMr¸Ú @py_format4Ú @py_format6rOrNs& rÚ)test_content_analyzer_protocol_complianceÚ@TestProtocolCompliance.test_content_analyzer_protocol_compliancesBä$ˆä˜$¤Ó0×0Œz×0Œz×0×0˜$×0˜$×××0×0××Ó7ˆØ× Ñ Ð8¤L×$8Ñ$8Ð8Ð$8Ñ8×8×8× ×8ˆx×8ˆx× ×8¤L×8×8¤L×8×8Ð$8×× ×(8Ñ(8Ð8Ð(8Ñ8×8×8×$×8×8×8×8×8ˆx×8ˆx× × ×8Ð(8×8×8×8××ÓØÐ˜4Ñ×××Óˆx×××××׈x×××Òˆx××Ö˜4×××××××Ðà×$ ^ÓØÐ˜Ñ×××Óˆv××Õˆv×××××Ö˜×××Ò˜×××××××Òà×1°.À)Ó Ø%˜vÑ%ˆ|×%ˆ|×%ˆ|×%×%˜v×%×%×%×%×%×%rc  óš
\4p\V\4q"'Eg9RRR\P!49g!\
P !\4'd\
P!\4MRRR\P!49g\
P !V4'd\
P!V4MRRR\P!49g!\
P !\4'd\
P!\4MRR\
P!V4/,p\\
P!V44hR pVPR
4pR qUV9qf'\
P!RV3RWT34R\
P!V4R R
\P!49g\
P !V4'd\
P!V4MR
/,pRRV/,p\\
P!V44hR ;rV\\P\P RR.R7p VP#V 4p
RqUV
9qf'\
P!RV3RWZ34R\
P!V4R R\P!49g\
P !V
4'd\
P!V
4MR/,pRRV/,p\\
P!V44hR ;rVVP%RR.4p RqUV 9qf'\
P!RV3RW[34R\
P!V4R R\P!49g\
P !V 4'd\
P!V 4MR/,pRRV/,p\\
P!V44hR ;rVVP'.RO4p \)V 4p^qÖV
8Hqî'Eg\
P!RV3RWm34RR\P!49g!\
P !\(4'd\
P!\(4MRRR\P!49g\
P !V 4'd\
P!V 4MRR \
P!V4R\
P!V
4/,pRRV/,p\\
P!V44hR ;p;ríR #) z<Test that MockTagGenerator implements TagGenerator protocol.ržr r_rNz100-project/test.mdrnÚdir_tagsrÁÚaiÚml)rMrNrOÚ content_tagsztopic/aiÚ hierarchicalr¤Ú consolidatedr¦)Útag1rÒÚtag2r«r­)rir rr´rpr rrQrrRrur{r)r)r_r¸rss& rÚ&test_tag_generator_protocol_complianceÚ=TestProtocolCompliance.test_tag_generator_protocol_compliance£äÓä˜$¤ Ó-×-Œz×-Œz×-×-˜$×-˜$× × ×-××/Ð0EÓØÐ$˜HÑ$ˆy×$ˆy×$×$×$˜H×$˜H×$×$×$×$×!×$ט$
ˆð
×1°(Ó ØÐ##ˆt×#ˆt×#×#×#×#×#|×#×#×#|×#×׸d°|Ó ØÐ)˜\Ñ)ˆz×)ˆz×)×)×)˜\×)˜\××,Ò-EÓFˆ Ü Ð% % %× ×%Œs×%Œs×%×%×%×%×%×%<×%×%×%<×%× ×%×% %×%×%×%×%×%rc  ó4\4p\V\4q"'Eg9RRR\P!49g!\
P !\4'd\
P!\4MRRR\P!49g\
P !V4'd\