+
    Qi                     <    ^ RI Ht ^RIHtHtHt  ! R R]4      tR# )    )TestCase)	AutomatonNoTransitionTransitionerc                   T   a  ] tR t^t o RtR tV 3R lR ltR tR tR t	R t
R	tV tR
# )	CoreTestszF
Tests for Automat's (currently private, implementation detail) core.
c                P   V P                  \        4      ;_uu_ 4        \        4        RRR4       RpRp\        WR7      pV P                  VP                  V4       V P                  V\        V4      4       V P                  V\        V4      4       R#   + '       g   i     Lt; i)zR
A L{NoTransition} exception describes the state and input symbol
that caused it.
Nzcurrent-stateztransitionless-symbol)statesymbol)assertRaises	TypeErrorr   assertIsr   assertInstr)selfr
   r   noTransitionExceptions   &   9/usr/lib/python3/dist-packages/automat/_test/test_core.pytest_NoTransitionCoreTests.test_NoTransition   s|     y))N *  ( ,5 H+22F;eS!678fc"789 *)s   BB%	c                   < V ^8  d   QhRR/# )   returnN )format__classdict__s   "r   __annotate__CoreTests.__annotate__   s     M M$ M    c                   \        R4      pVP                  RRR\        R.4      4       VP                  RR.4       \	        VR4      pV P                  VP                  R4      \        R.4      R34       V P                  VP                  R4      R.R34       V P                  VP                  R4      \        R.4      R34       R# )zh
Automaton.unhandledTransition sets the outputs and end-state to be used
for all unhandled transitions.
startz
oops-statecheckcheckedzoops-outN)r   addTransitiontupleunhandledTransitionr   assertEqual
transition)r   ats   &  r   test_unhandledTransition"CoreTests.test_unhandledTransition   s    
 '0&8	gwyk8JK	lZL9G$g.
|1Dd0KLg.)d0CDg.
|1Dd0KLr   c                ^    \        4       pV P                  \        VP                  RR4       R# )z`
L{Automaton.outputForInput} raises L{NoTransition} if no
transition for that input is defined.
zno-statez	no-symbolN)r   r   r   outputForInputr   r(   s   & r   test_noOutputForInputCoreTests.test_noOutputForInput*   s%    
 K,(8(8*kRr   c                V   \        4       pVP                  RRRR.4       V P                  VP                  4       R04       V P                  VP	                  4       R04       V P                  VP                  RR4      RR.34       V P                  VP                  4       RR04       R# )z
L{Automaton.addTransition} adds its input symbol to
L{Automaton.inputAlphabet}, all its outputs to
L{Automaton.outputAlphabet}, and causes L{Automaton.outputForInput} to
start returning the new state and output symbols.
	beginningbeginendingendN)r   r#   r&   inputAlphabetoutputAlphabetr-   statesr.   s   & r   test_oneTransitionCoreTests.test_oneTransition2   s     K	Wh@*WI6))+eW5))+w?(UGATUk8%<=r   c                ^   \        4       p^pV P                  \        VP                  RRRV4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P	                  VP                  4       4       V P	                  VP                  4       4       R# )zx
L{Automaton.addTransition} raises a TypeError when given outputs
that aren't iterable and doesn't add any transitions.
	fromState	viaSymboltoStateN)	r   r   r   r#   assertFalser6   r7   r8   allTransitions)r   r(   nonIterableOutputss   &  r   %test_oneTransition_nonIterableOutputs/CoreTests.test_oneTransition_nonIterableOutputs@   s    
 KOO	
 	*+))+,$))+,r   c                    \        4       pRVn        V P                  VP                  R4       V P                  \        4      ;_uu_ 4        RVn        RRR4       R#   + '       g   i     R# ; i)z
L{Automaton.initialState} is a descriptor that sets the initial
state if it's not yet set, and raises L{ValueError} if it is.

za statezanother stateN)r   initialStater&   r   
ValueErrorr.   s   & r   test_initialStateCoreTests.test_initialStateT   sM     K"3z**,AN +***s   AA.	r   N)__name__
__module____qualname____firstlineno____doc__r   r*   r/   r9   rB   rG   __static_attributes____classdictcell__)r   s   @r   r   r      s5     :$M MS>-(
- 
-r   r   N)unittestr   _corer   r   r   r   r   r   r   <module>rR      s     9 9X- X-r   