Folder full of pertinent coursework
� �� Vc @ s� d d l m Z d d l m Z m Z d d l m Z d d l m Z d � Z d � Z d d d � � YZ d d d � � YZ d d d � � YZ d S( i����( t JuliaSet( t uniformt randint( t sqrt( t with_setupc C s t d d � t d d � d S( sI Return a random complex number bounded by real and imaginary axes [-2, 2]i����i y �?( R ( ( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt rand_range s c C s? t d d � } t d | d � } t | | � } | | d S( s5 Return a random complex number within the unit circlei����i i y �?( R R ( t rt drt i( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt rand_circle s t TestRandomCc B sD e Z d Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s= Define a julia set with a random c seed value, test interfacec C s: t � | _ t d d � | _ t | j | j � | _ d S( s8 Setup fixture is run before every test method separatelyi id N( R t cR t nR t j( t self( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt setup s c C s | j j | j k s t � d S( s Test that c is an attributeN( R R t AssertionError( R ( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt test_c_value% s c C s | j j | j k s t � d S( s Test that n is an attributeN( R R R ( R ( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt test_n_value) s c C sj t � } d G| GHd G| d GH| d | j } d G| GH| j j | � } d G| GH| | k sf t � d S( s* Test that juliamap is implemented properlys z = s z**2 = i s z**2 + c = s juliamap(z) = N( R R R t juliamapR ( R t zt zcorrectt znew( ( sV /projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/github/intro/juliasets/test_juliaset.pyt test_juliamap- s c C s� d GH| j j d k s t � d GH| j j d � d G| j j GH| j j d k sY t � d GHd Gt | j j � GHd Gt d d � d GHt | j j � t d d � d k s� t � d S( s Test that changing spacing workss Test original spacing _d = 0.001g����MbP?s Test new spacing of _d = 0.1g�������?s _d = s&