python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_turtle.cpython-312.opt-1.pyc

Αe'8ddlZddlZddlmZddlmZddlmZejdZejZ	dZ
dZdZGd	d
ejZGddZGd
dZGddeejZGddeejZGddejZGddejZedk(rej,yy)N)support)
import_helper)	os_helperturtlea_width = 0.75
height = 0.8
canvwidth = 500
canvheight = 200
leftright = 100
topbottom = 100
mode = world
colormode = 255
delay = 100
undobuffersize = 10000
shape = circle
pencolor  = red
fillcolor  = blue
resizemode  = auto
visible  = None
language = english
exampleturtle = turtle
examplescreen = screen
title = Python Turtle Graphics
using_IDLE = ''
z# Comments!
# Testing comments!
pencolor  = red
fillcolor  = blue
visible  = False
language = english
# Some more
# comments
using_IDLE = False
z0
pencolor = red
fillcolor: blue
visible = False
c$eZdZdZdZdZdZy)TurtleConfigTestc|jtjtjt	tjd5}|j|dddtjS#1swYtjSxYw)Nw)
addCleanuprunlinkTESTFNopenwrite)selfcfg_strfs   D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_turtle.pyget_cfg_filezTurtleConfigTest.get_cfg_file7sb	(()*:*:;
)""C
(	A
GGG		s	A33Bc|jt}tj|}iddddddddd	d
dd
dd
dddd
ddddddddddddddddd d!d"d#}|j	||y)$Nwidthg?heightg?	canvwidth
canvheight	leftrightd	topbottommodeworld	colormodedelayundobuffersize'shapecirclepencolorred	fillcolorblue
resizemodeautovisiblelanguageenglish
exampleturtlerscreenzPython Turtle Graphics)
examplescreentitle
using_IDLE)rtest_configrconfig_dictassertEqualrcfg_name
parsed_cfgexpecteds    rtest_config_dictz!TurtleConfigTest.test_config_dict=s$$[1''1

d
s

#

#	







G



S

e

X



&

6


 
	!
"
X#
$&-)
.	
X.c|jt}tj|}dddddd}|j	||y)Nr)r+Fr0)r(r*r.r/r6)rtest_config_tworr8r9r:s    r&test_partial_config_dict_with_commentsz7TurtleConfigTest.test_partial_config_dict_with_comments[sL$$_5''1
!
	
X.r?c<|jt}tj5}tj|}dddj
}|jd||jd||jdddy#1swYSxYw)NzBad line in config-file zfillcolor: bluer)F)r(r.)	rinvalid_test_configrcaptured_stdoutrr8getvalueassertInr9)rr;stdoutr<err_msgs     rtest_config_dict_invalidz)TurtleConfigTest.test_config_dict_invalidjs$$%89

$
$
&	6&++H5J	6//#

0':

'1&
		6	6sBBN)__name__
__module____qualname__rr>rBrJr?rrr5s /<
/r?rceZdZdZy)VectorComparisonMixinct|t|k7r|jdtt||D]+\}\}}|j	||dj|-y)NzTuples are not of equal sizezvalues at index {} do not match)msg)lenfail	enumeratezipassertAlmostEqualformat)rvec1vec2idxijs      rassertVectorsAlmostEqualz.VectorComparisonMixin.assertVectorsAlmostEqual~sjt9D	!II45$St_5	IKC!Q""1;BB3G
#
I	Ir?N)rKrLrMr^rNr?rrPrP|sIr?rPceZdZdZdZy)
Multipliercd|S)NM*rNrothers  r__mul__zMultiplier.__mul__sE7|r?c|dS)N*MrNrcs  r__rmul__zMultiplier.__rmul__s|r?N)rKrLrMrerhrNr?rr`r`sr?r`cNeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
y)
	TestVec2Dctdd}|j|dd|j|dd|j|t|jtt|jttd|jttd|jtt||jttdddy)N?rrrn)Vec2Dr9assertIsInstanceassertRaises	TypeErrorrvecs  rtest_constructorzTestVec2D.test_constructorsCmQ%Q#c5))U+)UA.)UF3)UC0)UAq!4r?cRtdd}|jt|dy)Ng/$?gX9v?z(0.57,1.23))rpr9reprrts  r	test_reprzTestVec2D.test_reprs"E5!cM2r?c$tdd}tdd}tdd}|j|||j|t||jt|||j|||j||y)Nrrn*)rpr9tupleassertNotEqual)rrYrZvec3s    r
test_equalityzTestVec2D.test_equalitys{Q{S!}R|t$uT{+td+D$'D$'r?cTtdd}ttjdzD]q}|j	|5tj
||}tj|}|j|||j|tdddsy#1swY~xYw)Nrlrmrn)proto)protocol)	rprangepickleHIGHEST_PROTOCOLsubTestdumpsloadsr9rq)rrurpickled	unpickleds     r
test_picklingzTestVec2D.test_picklingsCm622Q67	8EE*
8 ,,sU;"LL1	  C0%%i7	
8
8	8
8
8sABB'	c|D]X}|j|5|\\}}}t|}t|}|||}	t|}|j|	|dddZy#1swYexYw)Ncase)rrpr^)
r
test_caseslambda_operator	test_casefirstsecondr=op1op2results
          r_assert_arithmetic_casesz"TestVec2D._assert_arithmetic_casess#	@I9-
@.7+%(UmVn(c2 (+--fh?
@
@	@
@
@s<AA(	c2gd}|j|dy)N))rrrnrn)?r))r)rmrm)rnrm)))g?rr)@rnc||zSNrNxys  r<lambda>z0TestVec2D.test_vector_addition.<locals>.<lambda>
q1ur?rrrs  rtest_vector_additionzTestVec2D.test_vector_additions

	
%%j2DEr?c2ddg}|j|dy)N)r)rr)))g@%@?)
r)g?rc||z
SrrNrs  rrz3TestVec2D.test_vector_subtraction.<locals>.<lambda>rr?rrs  rtest_vector_subtractionz!TestVec2D.test_vector_subtractions$
)8


	
%%j2DEr?ctdd}tdd}||z}d}|j||tdd}tdd}|j|dz||jd|z||j|dz||jd|z|t}|j	||zt|dd	|d
d	|j	||zd|y)Nrrl#g$@rrgrnrb)rprWr^r`r9)rrYrZanswerr=ruMs       rtest_vector_multiplyzTestVec2D.test_vector_multiplysR}S!}vx0CmB<%%cBh9%%b3h9%%cDj(;%%dSj(;Lq%3q6("
#a&}"EFSBse*-r?cFtdd}d}|j||y)Nr)rr)rpr^)rrur=s   rtest_vector_negativezTestVec2D.test_vector_negatives$Bn%%sdH5r?c|jttddd|jttddd|jttdddy)Nrrrg@)rWabsrpr9rs r
test_distancezTestVec2D.test_distancesSs5A;/4U1a[)1-s5a=137r?cgd}|D]P}|j|5|\\}}}t|}|j|}|j||dddRy#1swY]xYw)N)))rrr))roZr))roirnr))rr))rhrr)rrprotater^)rcasesrrurotr=gots       rtest_rotatezTestVec2D.test_rotatesv
	=D4(
='+$
cHSkjjo--c8<	
=
=	=
=
=s4AA$	N)rKrLrMrvryrrrrrrrrrrNr?rrjrjs<
53(8
@FF.&6
8
=r?rjcxeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZy)TestTNavigatorc6tj|_yr)r
TNavigatornavrs rsetUpzTestTNavigator.setUps$$&r?c|jjdd|j|jjd|j|jj	dyNr)rgotorWxcorycorrs r	test_gotozTestTNavigator.test_goto	sH

c4 txx}}4txx}}5r?c|jjddd|j|jjd|j|jj	d|jjddd|j|jjd|j|jj	dy)NiTfill_gapirF)rteleportrWrrrs r
test_teleportzTestTNavigator.test_teleports"cD1txx}}3txx}}4#rE2txx}}4txx}}3r?c4|j|jj|jj|jj	dd|j|jj|jjyr)r9rpos	_positionrrs rtest_poszTestTNavigator.test_poss\););<

c4 ););<r?c|j|jjd|jjd|j	|jjdy)Nrrr)r{r)r9r_orientleftr^rs r	test_leftzTestTNavigator.test_leftsF))84

b%%dhh&6&6
Cr?c|j|jjd|jjd|j	|jjdy)Nrr)rg)r9rrrightr^rs r
test_rightzTestTNavigator.test_right sF))84r%%dhh&6&6	Br?c|jjdd|j|jjd|j|jj	d|jj|j|jjd|j|jj	dy)Nrrr)rrrWrrresetrs r
test_resetzTestTNavigator.test_reset%s

c4 txx}}4txx}}5txx}}2txx}}2r?c|jjdtdd}|j|jj	||jj|jj
d|jjdtdd}|j|jj	||jt|jjdy)Nrr
skldjfldsk)	rforwardrpr^positionrrrrrsrr=s  rtest_forwardzTestTNavigator.test_forward-sa=%%dhh&7&7&98D

bC=%%dhh&7&7&98D)TXX%5%5|Dr?c|jjdtdd}|j|jj	||jj|jj
d|jjdtdd}|j|jj	|y)Nr8rr)rbackrpr^rrrrs  rtest_backwardszTestTNavigator.test_backwards:s

cq>%%dhh&7&7&98Dr

cC=%%dhh&7&7&98Dr?c|jjdd}|j|jjt	dd|y)Nrr)rrrWdistancerprs  rrzTestTNavigator.test_distanceEs>txx00q<hGr?c|jjd|j|jjd|jj	|j|jjd|jj|j|jjdy)Nrgm U!?)rrrWheadingradiansdegreesrs rtest_radians_and_degreesz'TestTNavigator.test_radians_and_degreesJs

btxx//126txx//1:>txx//126r?c	Bgd}|D]\\}}}|j|jj||||j|jj||f||j|jjt|||y)N)))rrr{))rrgF@))rrgV@))rrg`@))rrgf@))rrg l@))rrgp@))rrgs@)r9rtowardsrp)rcoordinatesrrr=s     rtest_towardszTestTNavigator.test_towardsRs

!,	FFQHTXX--a3X>TXX--q!f5x@TXX--eAqk:HE	Fr?c|jjd|j|jjd|jjd|j|jjd|jj	d|j|jjd|jt|jjd|jjgd}t|dz}|D]}|jj||j|jj||jjdt|z
dz}|D]}|jj	||j|jj||jjgd	}d
}|D]y}|d
kr%|jj	t|n|jj|||z
}|j|jj|dz{y)Nr-g?g̬`@sdkfjdsf)rr,r)
rriVri.gfffff&A@gIrg{G=rr)rrrWrrrrrsrsumr9r)r	rotationsrnum
sum_so_fars     rtest_headingzTestTNavigator.test_headinges

btxx//126

btxx//137stxx//159)TXX^^Z@&	Y#%	CHHMM#	))+V4c)n$+	 CHHNN3	 ))+V4L	
	ICQws3x(

c"#J""488#3#3#5zC7GH
	Ir?c,|jjd|j|jjd|jjd|j|jjd|jjd|j|jjd|jjd|j|jjdy)NgGzY@gQ^gp=
ףm@gQBgףp=S@ix)r
setheadingrWrrs rtest_setheadingzTestTNavigator.test_setheadingsF#txx//16:G$txx//1?CH%txx//13CDF#txx//1:>r?c|jjd|jjd|jjd|j|jj	dy)Nrrr)gY@gi)rrrr^rrs rtest_positionszTestTNavigator.test_positionssP

b%%dhhllnoFr?c|jjd|jjd|j|jj	dy)NZd;YA)rr)rsetxsetyr^rrs rtest_setx_and_setyz!TestTNavigator.test_setx_and_setys=

j!

j!%%dhhlln6NOr?cL|jjd|jjd|jj|j	|jjd|j
|jjdy)Nri`yrr)rrrhomer^rrWrrs r	test_homezTestTNavigator.test_homesh

b!

%%dhhllne<txx//115r?c|j|jjdddtdd}|j|jj|dtj}|j
d|jd|j|jj|dy)	Nr(2g)\(?gMbP?g-)?rr%)rWrrrprrrr)rruanother_turtles   rtest_distance_methodz#TestTNavigator.test_distance_methodstxx00R8"=D$txx0057JK**,Bu%txx00@%Hr?N)rKrLrMrrrrrrrrrrrrr
rrrrr!rNr?rrrsg'6
4=
D
C
3E	EH
7F& ID?GP
6Ir?rceZdZdZdZdZy)TestTPenc&tj}|j|j|j	|j|j|j
|j|jyr)rTPen
assertTrueisdownpenupassertFalsependownrtpens  rtest_pendown_and_penupzTestTPen.test_pendown_and_penupsW{{}
&

'
&r?c&tj}|j|j|j	|j|j|j
|j|jyr)rr%r&	isvisible
hideturtler)
showturtler+s  r(test_showturtle_hideturtle_and_isvisiblez1TestTPen.test_showturtle_hideturtle_and_isvisibles\{{}())*()r?cFtj}dD]}|j|jdd||j	|j|j
|jdd||j|jy)N)TFrrr)rr%r(rr)r'r*r&)rr,fill_gap_values   rrzTestTPen.test_teleportsx{{}+	+NJJLMM#s^M<T[[]+LLNMM$~M>OODKKM*
	+r?N)rKrLrMr-r2rrNr?rr#r#s'*
+r?r#ceZdZdZy)TestModuleLevelcddl}dddddd}|D]\}|j|5tt|}|j	|}|jt
|||ddd^y#1swYixYw)	Nrz3(x=None, y=None, *, fill_gap: bool = False) -> Nonez()z(x, y=None)z(*args)z(pen=None, **pendict))rundorbgcolorpen)name)inspectrgetattrr	signaturer9str)rr<known_signaturesr;objsigs      rtest_all_signaturesz#TestModuleLevel.test_all_signaturessF! *

%	CD4(
Cfd+'',  S+;D+AB
C
C	C
C
CsAA//A8	N)rKrLrMrCrNr?rr6r6sCr?r6__main__)runittesttestrtest.supportrr
import_modulerrpr7rArDTestCaserrPr`rjrr#r6rKmainrNr?r<module>rKs
&"
%	$	$X	..
Dx((DNIIs=%x'8'8s=lfI*H,=,=fIR +x   +FCh''C(zHMMOr?