Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

Scientific Computing Midterm

1124 views
�
)�FVc@sKddlmZddlmZddlZd�Zd�Zd�ZdS(i����(t	Attractor(t
with_setupNcCs2t�}|j|j|jks.td��dS(s� Our first test will be to ensure that our time increment, dt, is being properly calculated.
    If this test fails we will be warned that there was a calculation error.s7
 There was a problem calculating the time increment! 
N(RtendtdttpointstAssertionError(ta((s_/projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/Midterm/CS510-Fall2015-Midterm/test_attractor.pyttest_dts	cCsIt�}tjdddg�}|j|�jdksEtd��dS(s� This test case is to ensure proper size of the value returned by our euler method.
    If this test fails it will indicate that there aren't the correct number of items being passed
    to the method.gis?
 The array given to the euler method did not contain 3 items!
N(i(RtnptarrayteulertshapeR(Rtxyz((s_/projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/Midterm/CS510-Fall2015-Midterm/test_attractor.pyt
test_eulers	cCs7t�}|j�j|jdfks3td��dS(s� This test case is to ensure proper number of parameters are being passed to the evolve method. As
    above, this test also check for proper passing of paramters.is5
 The array given to the evolve method was improper!
N(RtevolveRRR(R((s_/projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/Midterm/CS510-Fall2015-Midterm/test_attractor.pyttest_evolves	(	t	attractorRtnoseRtnumpyRRR
R(((s_/projects/20b744b4-dd84-4163-8ecd-9285794a6d7d/Midterm/CS510-Fall2015-Midterm/test_attractor.pyt<module>s