+
    Bi^                         ^ RI Ht ^ RIt^ RIt^ RIHt ^ RIHt  ! R R]4      t ! R R]4      t	 ! R	 R
]4      t
 ! R R]4      t ! R R]4      t ! R R]4      tR# )    )TestCaseN)
exceptions)_LATEST_VERSIONc                      a  ] tR t^
t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tRtV tR# )TestBestMatchc                j   \        \        V4      P                  V4      4      pR V RV: R2pV P                  W4R7       \        P
                  ! \        V4      4      p\        P
                  ! \        V4      4      pV P                  VP                  4       VP                  4       RV RV 24       V# )zNo errors found for z under !)msgzNo consistent best match!
Got: z

Then: )
listr   iter_errors
assertTruer   
best_matchiterreversedassertEqual	_contents)selfinstanceschemaerrorsr
   bestreversed_bests   &&&    ^/var/www/html/photoedit/myenv/lib/python3.14/site-packages/jsonschema/tests/test_exceptions.pybest_match_ofTestBestMatch.best_match_of   s    of-99(CD%hZwvjB($$T&\2"--hv.>?NN##%.tfJ}oN	

     c                    R RR^R RRR/////pV P                  RR. //VR7      pV P                  VP                  R4       R# )
propertiesfoominPropertiesbartypeobjectr   r   Nr   r   	validatorr   r   r   s   &  r   (test_shallower_errors_are_better_matches6TestBestMatch.test_shallower_errors_are_better_matches   sa    #Q 568*<"=
 !!EE2;+?!O9r   c                    R^RRR/RR/.RRR/RR/./pV P                  / VR7      pV P                  VP                  R4       R# )	zV
A property you *must* match is probably better than one you have to
match a part of.
r    anyOfr"   stringnumberoneOfr$   Nr%   r'   s   &  r   %test_oneOf_and_anyOf_are_weak_matches3TestBestMatch.test_oneOf_and_anyOf_are_weak_matches&   sc     Qvx(68*<=vx(68*<=

 !!2f!=9r   c                    RRRRR/RRRR///.///pV P                  RR^//VR7      pV P                  VP                  R4       R	# )
a  
If the most relevant error is an anyOf, then we traverse its context
and select the otherwise *least* relevant error, since in this case
that means the most specific, deep, error inside the instance.

I.e. since only one of the schemas must match, we look for the most
relevant one.
r   r   r+   r"   r,   r!   arrayr$   Nr   r   validator_valuer'   s   &  r   8test_if_the_most_relevant_error_is_anyOf_it_is_traversedFTestBestMatch.test_if_the_most_relevant_error_is_anyOf_it_is_traversed4   s     *%/@'AB	
 !!EE2;+?!O--w7r   c                ~    RRR/RR/RR/./pV P                  . VR7      pV P                  VP                  R4       R# )zz
We don't traverse into an anyOf (as above) if all of its context errors
seem to be equally "wrong" against the instance.
r+   r"   r,   integerr#   r$   Nr%   r'   s   &  r   3test_no_anyOf_traversal_for_equally_relevant_errorsATestBestMatch.test_no_anyOf_traversal_for_equally_relevant_errorsK   V     "#"
 !!2f!=1r   c                r    RRR/./pV P                  . VR7      pV P                  VP                  R4       R# )zl
We *do* traverse anyOf with a single nested error, even though it is
vacuously equally relevant to itself.
r+   r"   r,   r$   Nr%   r'   s   &  r   6test_anyOf_traversal_for_single_equally_relevant_errorDTestBestMatch.test_anyOf_traversal_for_single_equally_relevant_error[   F     "

 !!2f!=0r   c                z    RRR^%//./pV P                  ^^.VR7      pV P                  VP                  R4       R# )zd
We *do* traverse anyOf with a single subschema that fails multiple
times (e.g. on multiple items).
r+   itemsconstr$   Nr%   r'   s   &  r   .test_anyOf_traversal_for_single_sibling_errors<TestBestMatch.test_anyOf_traversal_for_single_sibling_errorsi   N     7B-(

 !!B8F!C1r   c                    RRR/RR^%//./pV P                  ^^.VR7      pV P                  VP                  R4       R# )zO
We *do* traverse anyOf with multiple subschemas when one does not type
match.
r+   r"   r#   rB   rC   r$   Nr%   r'   s   &  r   9test_anyOf_traversal_for_non_type_matching_sibling_errorsGTestBestMatch.test_anyOf_traversal_for_non_type_matching_sibling_errorsw   V     "7B-(
 !!B8F!C1r   c                    RRRRR/RRRR///.///pV P                  RR^//VR7      pV P                  VP                  R4       R	# )
a  
If the most relevant error is an oneOf, then we traverse its context
and select the otherwise *least* relevant error, since in this case
that means the most specific, deep, error inside the instance.

I.e. since only one of the schemas must match, we look for the most
relevant one.
r   r   r.   r"   r,   r!   r2   r$   Nr3   r'   s   &  r   8test_if_the_most_relevant_error_is_oneOf_it_is_traversedFTestBestMatch.test_if_the_most_relevant_error_is_oneOf_it_is_traversed   r7   r   c                ~    RRR/RR/RR/./pV P                  . VR7      pV P                  VP                  R4       R# )zz
We don't traverse into an oneOf (as above) if all of its context errors
seem to be equally "wrong" against the instance.
r.   r"   r,   r9   r#   r$   Nr%   r'   s   &  r   3test_no_oneOf_traversal_for_equally_relevant_errorsATestBestMatch.test_no_oneOf_traversal_for_equally_relevant_errors   r<   r   c                r    RRR/./pV P                  . VR7      pV P                  VP                  R4       R# )zl
We *do* traverse oneOf with a single nested error, even though it is
vacuously equally relevant to itself.
r.   r"   r,   r$   Nr%   r'   s   &  r   6test_oneOf_traversal_for_single_equally_relevant_errorDTestBestMatch.test_oneOf_traversal_for_single_equally_relevant_error   r@   r   c                z    RRR^%//./pV P                  ^^.VR7      pV P                  VP                  R4       R# )zd
We *do* traverse oneOf with a single subschema that fails multiple
times (e.g. on multiple items).
r.   rB   rC   r$   Nr%   r'   s   &  r   .test_oneOf_traversal_for_single_sibling_errors<TestBestMatch.test_oneOf_traversal_for_single_sibling_errors   rF   r   c                    RRR/RR^%//./pV P                  ^^.VR7      pV P                  VP                  R4       R# )zO
We *do* traverse oneOf with multiple subschemas when one does not type
match.
r.   r"   r#   rB   rC   r$   Nr%   r'   s   &  r   9test_oneOf_traversal_for_non_type_matching_sibling_errorsGTestBestMatch.test_oneOf_traversal_for_non_type_matching_sibling_errors   rJ   r   c                    RRRRR/RRRR///.///pV P                  RR^//VR7      pV P                  VP                  R4       R	# )
z
Now, if the error is allOf, we traverse but select the *most* relevant
error from the context, because all schemas here must match anyways.
r   r   allOfr"   r,   r!   r2   r$   Nr3   r'   s   &  r   8test_if_the_most_relevant_error_is_allOf_it_is_traversedFTestBestMatch.test_if_the_most_relevant_error_is_allOf_it_is_traversed   ss     *%/@'AB	
 !!EE2;+?!O--x8r   c           
         RRRRR/RRR/RRRR///././//pV P                  RR^//VR7      pV P                  VP                  R4       R	# )
zX
We traverse into nested contexts (a oneOf containing an error in a
nested oneOf here).
r   r   r.   r"   r,   r!   r2   r$   Nr3   r'   s   &  r   test_nested_context_for_oneOf+TestBestMatch.test_nested_context_for_oneOf   s     *#!' 2$0(-/@3&!"&	
& !!EE2;+?!O--w7r   c                   R RRRRR^/RRR^
/.///pV P                  RR/VR	7      pV P                  VP                  R4       R RRRRR^
/RRR^/.///pV P                  RR/VR	7      pV P                  VP                  R4       R
# )r   r   r+   r"   r2   minItemsr,   	minLengthr!   r$   Nr%   r   r   r   	reordereds   &   r   "test_it_prioritizes_matching_types0TestBestMatch.test_it_prioritizes_matching_types  s    *a8;;	
 !!E5>&!I5 ;;*a8	
	 !!E5>)!L5r   c                   R RRRRR.R^/RRR.R	^
/.///pV P                  RR
/VR7      pV P                  VP                  R	4       R RRRRR	^
/RRR^/.///pV P                  RR
/VR7      pV P                  VP                  R	4       R# )r   r   r+   r"   r2   r#   rb   r9   r,   rc   r!   r$   Nr%   rd   s   &   r   (test_it_prioritizes_matching_union_types6TestBestMatch.test_it_prioritizes_matching_union_types"  s    '8!4j!D)X!6RH	
 !!E5>&!I5 ;;*a8	
	 !!E5>)!L5r   c                r    R RR//pV P                  RR/VR7      pV P                  VP                  4       R# )r   r   Fr!   r$   N)r   assertIsNoner&   r'   s   &  r   test_boolean_schemas"TestBestMatch.test_boolean_schemas=  s;    /!!E5>&!I$..)r   c                    \        R ^/4      pVP                  / 4       V P                  \        P                  ! VP                  / 4      4      P
                  R 4       R# )r    N)r   r   r   r   r   r&   r   r&   s   & r   test_one_errorTestBestMatch.test_one_errorB  sO    #_a$89	b!!!)"7"7";<FF	
r   c                    \        / 4      pV P                  \        P                  ! VP	                  / 4      4      4       R # )N)r   rl   r   r   r   rp   s   & r   test_no_errorsTestBestMatch.test_no_errorsJ  s0    #B'	*//	0E0Eb0IJKr    N)__name__
__module____qualname____firstlineno__r   r(   r/   r5   r:   r>   rD   rH   rL   rO   rR   rU   rX   r\   r_   rf   ri   rm   rq   rt   __static_attributes____classdictcell____classdict__s   @r   r   r   
   sp     
::8.2 1228.2 1229&886666*

L Lr   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )TestByRelevanceiO  c                    \         P                  ! R R.R7      p\         P                  ! RRR.R7      p\        W.\         P                  R7      pV P	                  W14       \        W!.\         P                  R7      pV P	                  W14       R# )Oh no!bazpathOh yes!r   r!   keyN)r   ValidationErrormax	relevanceassertIs)r   shallowdeepmatchs   &   r   #test_short_paths_are_better_matches3TestByRelevance.test_short_paths_are_better_matchesP  sl    ,,XUGD)))5%.IWO)=)=>e%TO)=)=>e%r   c                   \         P                  ! R . R7      p\         P                  ! RR.R7      p\        W.\         P                  R7      pT P	                  V Uu. uF  p\        VP                  4      NK  	  upR.. .4       \        W!.\         P                  R7      pT P	                  V Uu. uF  p\        VP                  4      NK  	  upR.. .4       R# u upi u upi )r   r   r   r   r   N)r   r   sortedr   r   r   r   )r   r   r   r   errors   &    r   *test_global_errors_are_even_better_matches:TestByRelevance.test_global_errors_are_even_better_matchesY  s    ,,XB?)))5'BZ-A-AB+126%T%**62WbM	

 Z-A-AB+126%T%**62WbM	
 3 3s   C1C!c                   \         P                  ! R . RR7      p\         P                  ! R. RR7      p\         P                  ! RR7      p\        W.VR7      pV P	                  WB4       \        W!.VR7      pV P	                  WB4       R# )r   ar   r&   r   b)weakr   Nr   r   by_relevancer   r   )r   r   normalr   r   s   &    r   %test_weak_keywords_are_lower_priority5TestByRelevance.test_weak_keywords_are_lower_priorityi  sn    ))(sK++IB#N,,#6
TN
3e$VN
3e$r   c                L   \         P                  ! R . RR7      p\         P                  ! R. RR7      p\         P                  ! R. RR7      p\         P                  ! RRR7      p\        WV.VR7      pV P	                  WS4       \        W2V.VR7      pV P	                  WS4       R	# )
r   r   r   r   r   zOh fine!c)r   strongr   Nr   )r   r   r   r   r   r   s   &     r   (test_strong_keywords_are_higher_priority8TestByRelevance.test_strong_keywords_are_higher_priorityu  s    ))(sK++IB#N++JR3O,,#cB
T6*
;e$VT*
;e$r   rv   N)
rw   rx   ry   rz   r   r   r   r   r{   r|   r}   s   @r   r   r   O  s     &
 
%% %r   r   c                   n   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tRtV tR# )TestErrorTreei  c                    \        ^4       Uu. uF  p\        P                  ! RVR7      NK  	  pp\        P                  ! V4      pV P	                  VP
                  ^4       R# u upi )   	Somethingr&   N)ranger   r   	ErrorTreer   total_errors)r   ir   trees   &   r   /test_it_knows_how_many_total_errors_it_contains=TestErrorTree.test_it_knows_how_many_total_errors_it_contains  sb     1X
 &&{a@ 	 
 ##F+**A.
s   !A%c                    \         P                  ! R R.R7      .p\         P                  ! V4      pV P                  RV4       R# )	a messager!   r   N)r   r   r   assertInr   r   r   s   &  r   1test_it_contains_an_item_if_the_item_had_an_error?TestErrorTree.test_it_contains_an_item_if_the_item_had_an_error  s7    ,,[wGH##F+eT"r   c                    \         P                  ! R R.R7      .p\         P                  ! V4      pV P                  RV4       R# )r   r!   r   r   N)r   r   r   assertNotInr   s   &  r   9test_it_does_not_contain_an_item_if_the_item_had_no_errorGTestErrorTree.test_it_does_not_contain_an_item_if_the_item_had_no_error  s9    ,,[wGH##F+%r   c                    \         P                  ! R RR7      p\         P                  ! V.4      pV P                  VP                  RV/4       R# )r   r   r   Nr   r   r   r   r   r   r   r   s   &  r   /test_keywords_that_failed_appear_in_errors_dict=TestErrorTree.test_keywords_that_failed_appear_in_errors_dict  s>    **;%H##UG,uen5r   c                    \         P                  ! R R.R7      \         P                  ! RR^ .R7      .p\         P                  ! V4      pV P                  ^ VR,          4       V P	                  ^VR,          4       R# )za bar messager!   r   za bar -> 0 messageN)r   r   r   r   r   r   s   &  r   1test_it_creates_a_child_tree_for_each_nested_path?TestErrorTree.test_it_creates_a_child_tree_for_each_nested_path  sh    &&eWE&&';5!*M
 ##F+ae%DK(r   c                    \         P                  ! R RR^ .R7      \         P                  ! RRR^ .R7      r!\         P                  ! W.4      pV P                  VR,          ^ ,          P                  RVRV/4       R# )1r   r!   )r&   r   2quuxNr   r   e1e2r   s   &   r   +test_children_have_their_errors_dicts_built9TestErrorTree.test_children_have_their_errors_dicts_built  sn    &&se5!*M&&sfE1:N  ##RH-eQ..FB0GHr   c                    \         P                  ! R RRR.RR7      \         P                  ! RRR^.R	R7      r!\         P                  ! W.4       R
# r   r   r!   bar2i1r&   r   r   r   r   foobari2N)r   r   r   )r   r   r   s   &  r   "test_multiple_errors_with_instance0TestErrorTree.test_multiple_errors_with_instance  sW    &&V_	
 && ]	  	bX&r   c                    \         P                  ! R R. R7      p\         P                  ! V.4      pV P                  \        4      ;_uu_ 4        V^ ,           RRR4       R#   + '       g   i     R# ; i)123r   )r&   r   N)r   r   r   assertRaises
IndexErrorr   s   &  r   >test_it_does_not_contain_subtrees_that_are_not_in_the_instanceLTestErrorTree.test_it_does_not_contain_subtrees_that_are_not_in_the_instance  sO    **5EBO##UG,z**G +***s   
A""A3	c                    \         P                  ! RR/ R.R7      p\         P                  ! V.4      pV P                  VR,          \         P                  4       R# )zt
If a keyword refers to a path that isn't in the instance, the
tree still properly returns a subtree for that path.
r   r   )r&   r   r   N)r   r   r   assertIsInstancer   s   &  r   9test_if_its_in_the_tree_anyhow_it_does_not_raise_an_errorGTestErrorTree.test_if_its_in_the_tree_anyhow_it_does_not_raise_an_error  sM     **52UG
 ##UG,d5k:+?+?@r   c                    \         P                  ! R RRR.RR7      \         P                  ! RRR^.R	R7      r!\         P                  ! W.4      pV P                  \	        V4      RR04       R
# r   )r   r   r   r   setr   s   &   r   	test_iterTestErrorTree.test_iter  sr    &&V_	
 && ]	  ##RH-TUH$56r   c                    \         P                  ! R RRR.RR7      p\         P                  ! V.4      pV P                  \	        V4      R4       R# )r   r   r!   r   r   r   z<ErrorTree (1 total error)>Nr   r   r   r   reprr   s   &  r   test_repr_singleTestErrorTree.test_repr_single  sK    **	
 ##UG,d%BCr   c                    \         P                  ! R RRR.RR7      \         P                  ! RRR^.R	R7      r!\         P                  ! W.4      pV P                  \	        V4      R
4       R# )r   r   r!   r   r   r   r   r   r   r   z<ErrorTree (2 total errors)>Nr   r   s   &   r   test_repr_multiple TestErrorTree.test_repr_multiple  sn    &&V_	
 && ]	  ##RH-d%CDr   c                h    \         P                  ! . 4      pV P                  \        V4      R 4       R# )z<ErrorTree (0 total errors)>N)r   r   r   r   )r   r   s   & r   test_repr_emptyTestErrorTree.test_repr_empty  s'    ##B'd%CDr   rv   N)rw   rx   ry   rz   r   r   r   r   r   r   r   r   r   r   r   r   r   r{   r|   r}   s   @r   r   r     sQ     /#
&
6
)I'
A7 DE E Er   r   c                   b   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )TestErrorInitReprStri  c                t    \        R RR^RR/R7      pVP                  V4       \        P                  ! R/ VB # )hellor"   r,   )messager&   r4   r   r   rv   )dictupdater   r   )r   kwargsdefaultss   &, r   
make_errorTestErrorInitReprStr.make_error  sB    $H%
 	))5H55r   c                   \         P                  ! V4      P                  R 4      pV P                  ! R/ VB p\	        V4      P                  R 4      w  rEpV P                  WCP                  4       V P                  Wa4       R# )
Nrv   )textwrapdedentrstripr   str	partitionr   r   )r   expectedr   r   message_line_rests   &&,    r   assertShows TestErrorInitReprStr.assertShows
  se    ??8,33D9)&) #E
 4 4T :}}5(r   c                p    V P                  4       pV P                  \        VP                  4      ^4       R# )   N)r   assertGreaterlenargs)r   r   s   & r   !test_it_calls_super_and_sets_args6TestErrorInitReprStr.test_it_calls_super_and_sets_args  s&    !3uzz?A.r   c                f    V P                  \        \        P                  ! R R7      4      R4       R# )zHello!r   z<ValidationError: 'Hello!'>N)r   r   r   r   r   s   &r   	test_reprTestErrorInitReprStr.test_repr  s&    ++H=>)	
r   c           	        \         P                  ! R 4      pV P                  \        V4      R 4       RRRRR^RRR//pV FA  p\	        V4      pWC \         P                  ! R/ VB pV P                  \        V4      R 4       KC  	  R# )	r   r&   r"   r4   r,   r   r   Nr  )r   r   r   r   r   )r   r   r   attrks   &    r   test_unset_error%TestErrorInitReprStr.test_unset_error  s    **95UY/ xvx(	
 DVA..>A>ESZ3	 r   c                .    V P                  R . . R7       R# )z
            Failed validating 'type' in schema:
                {'type': 'string'}

            On instance:
                5
            r   schema_pathNr  r  s   &r   test_empty_paths%TestErrorInitReprStr.test_empty_paths-  s"      	 
	
r   c                2    V P                  R ^ .R.R7       R# )z
            Failed validating 'type' in schema:
                {'type': 'string'}

            On instance[0]:
                5
            rB   r  Nr  r  s   &r   test_one_item_paths(TestErrorInitReprStr.test_one_item_paths:  s&      	 	 
	
r   c                6    V P                  R ^ R.. ROR7       R# )z
            Failed validating 'type' in schema['items'][0]:
                {'type': 'string'}

            On instance[0]['a']:
                5
            r   r  N)rB   r   r	  r  r  s   &r   test_multiple_item_paths-TestErrorInitReprStr.test_multiple_item_pathsG  s&     S' 	 
	
r   c                    V P                  R \        \        ^4      4      \        \	        \        ^4      \        ^4      4      4      RR7       R# )a?  
            Failed validating 'maxLength' in schema:
                {0: 0,
                 1: 1,
                 2: 2,
                 3: 3,
                 4: 4,
                 5: 5,
                 6: 6,
                 7: 7,
                 8: 8,
                 9: 9,
                 10: 10,
                 11: 11,
                 12: 12,
                 13: 13,
                 14: 14,
                 15: 15,
                 16: 16,
                 17: 17,
                 18: 18,
                 19: 19}

            On instance:
                [0,
                 1,
                 2,
                 3,
                 4,
                 5,
                 6,
                 7,
                 8,
                 9,
                 10,
                 11,
                 12,
                 13,
                 14,
                 15,
                 16,
                 17,
                 18,
                 19,
                 20,
                 21,
                 22,
                 23,
                 24]
            	maxLength)r   r   r&   N)r  r   r   r   zipr  s   &r   test_uses_pprint%TestErrorInitReprStr.test_uses_pprintT  sC    1d %)_E"IuRy12!k 	 6	
r   c                N    V P                  R R^R^R^%R^I/R^IR^%R^R^/R	7       R
# )z
            Failed validating 'type' in schema:
                {'do': 3, 'not': 7, 'sort': 37, 'me': 73}

            On instance:
                {'here': 73, 'too': 37, 'no': 7, 'sorting': 3}
            donotsortmeheretoonosorting)r   r   Nr  r  s   &r   test_does_not_reorder_dicts0TestErrorInitReprStr.test_does_not_reorder_dicts  sP     aqb	 ra1	 	 	
r   c                   a   ! V 3R lR4      pV! 4       p\         P                  ! RRVRRR7      pS P                  \        V4      \	        V4      4       R# )	z
Check for #164 which rendered exceptions unusable when a
`ValidationError` involved instances with an `__eq__` method
that returned truthy values.
c                   :   <a  ] tR tRt o V3R ltV3R ltRtV tR# )dTestErrorInitReprStr.test_str_works_with_instances_having_overriden_eq_operator.<locals>.DontEQMeBroi  c                *   < SP                  R 4       R# zDon't!Nfailthisotherr   s   &&r   __eq__kTestErrorInitReprStr.test_str_works_with_instances_having_overriden_eq_operator.<locals>.DontEQMeBro.__eq__      		(#r   c                *   < SP                  R 4       R# r9  r:  r<  s   &&r   __ne__kTestErrorInitReprStr.test_str_works_with_instances_having_overriden_eq_operator.<locals>.DontEQMeBro.__ne__  rA  r   rv   N)rw   rx   ry   rz   r?  rC  r{   r|   )r~   r   s   @r   DontEQMeBror7    s     $$ $r   rE  r   r   somer   )r&   r   r4   r   N)r   r   r   r   r   )r   rE  r   r   s   f   r   :test_str_works_with_instances_having_overriden_eq_operatorOTestErrorInitReprStr.test_str_works_with_instances_having_overriden_eq_operator  sM    	$ 	$ =**"
 	d8nc%j1r   rv   N)rw   rx   ry   rz   r   r  r  r  r  r  r   r#  r(  r3  rG  r{   r|   r}   s   @r   r   r     sB     	6)/
4"


7
r
.2 2r   r   c                   &   a  ] tR tRt o R tRtV tR# )TestHashablei  c                b    \         P                  ! R 4      0 \         P                  ! R 4      0 R# ) N)r   r   SchemaErrorr  s   &r   test_hashableTestHashable.test_hashable  s$    		#	#B	'(				#$r   rv   N)rw   rx   ry   rz   rN  r{   r|   r}   s   @r   rJ  rJ    s     % %r   rJ  c                   t   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tR tR tR tRtV tR# )TestJsonPathRenderingi  c                    \         P                  ! V.R RRR7      pVP                  pV P                  WB4       \        P
                  ! V4      P                  P                  ^ ,          pV P                  WQ4       R# )r   r   r   )r   r   r&   r   N)r   r   	json_pathr   jsonpath_ngparserightfields)r   property_nameexpected_pathr   rendered_json_pathre_parsed_names   &&&   r   validate_json_path_rendering2TestJsonPathRendering.validate_json_path_rendering  sk    **	
 #__+;$**+=>DDKKAN7r   c                *    V P                  R R4       R# )xz$.xNr\  r  s   &r   
test_basic TestJsonPathRendering.test_basic  s    ))#u5r   c                *    V P                  R R4       R# )rL  z$['']Nr`  r  s   &r   
test_empty TestJsonPathRendering.test_empty  s    ))"g6r   c                *    V P                  R R4       R# )r   z$['1']Nr`  r  s   &r   test_number!TestJsonPathRendering.test_number      ))#x8r   c                *    V P                  R R4       R# ).z$['.']Nr`  r  s   &r   test_period!TestJsonPathRendering.test_period  ri  r   c                *    V P                  R R4       R# )'z$['\'']Nr`  r  s   &r   test_single_quote'TestJsonPathRendering.test_single_quote  s    ))#z:r   c                *    V P                  R R4       R# ) z$[' ']Nr`  r  s   &r   
test_space TestJsonPathRendering.test_space  ri  r   c                *    V P                  R R4       R# )\z$['\\']Nr`  r  s   &r   test_backslash$TestJsonPathRendering.test_backslash  s    ))$
;r   c                *    V P                  R R4       R# )z\'z	$['\\\'']Nr`  r  s   &r   test_backslash_single_quote1TestJsonPathRendering.test_backslash_single_quote  s    ))%>r   c                *    V P                  R R4       R# )r  z$['_']Nr`  r  s   &r   test_underscore%TestJsonPathRendering.test_underscore  s    ))#y9r   c                *    V P                  R R4       R# )"z$['"']Nr`  r  s   &r   test_double_quote'TestJsonPathRendering.test_double_quote  s    ))#|<r   c                *    V P                  R R4       R# )-z$['-']Nr`  r  s   &r   test_hyphen!TestJsonPathRendering.test_hyphen  ri  r   c                *    V P                  R R4       R# )za[0]z	$['a[0]']Nr`  r  s   &r   test_json_path_injection.TestJsonPathRendering.test_json_path_injection  s    ))&+>r   c                *    V P                  R R4       R# )[z$['[']Nr`  r  s   &r   test_open_bracket'TestJsonPathRendering.test_open_bracket  ri  r   rv   N)rw   rx   ry   rz   r\  ra  rd  rg  rl  rp  rt  rx  r{  r~  r  r  r  r  r{   r|   r}   s   @r   rQ  rQ    sP     86799;9<?:=9?9 9r   rQ  )unittestr   r   rT  
jsonschemar   jsonschema.validatorsr   r   r   r   r   rJ  rQ  rv   r   r   <module>r     sj       ! 1BLH BLJ
1%h 1%hxEH xEv|28 |2~%8 %49H 49r   