Added testing examples in session-3.
authorShantanu <shantanu@fossee.in>
Wed, 07 Oct 2009 23:41:54 +0530
changeset 56 7a8cb7b07ebb
parent 55 09c73bf81987
child 57 73462010a2fe
Added testing examples in session-3.
day2/session3.tex
--- a/day2/session3.tex	Wed Oct 07 15:33:21 2009 +0530
+++ b/day2/session3.tex	Wed Oct 07 23:41:54 2009 +0530
@@ -22,7 +22,7 @@
 
 \mode<presentation>
 {
-  \usetheme{CambridgeUS}
+  \usetheme{Warsaw}
   %\usetheme{Boadilla}
   %\usetheme{default}
   \useoutertheme{split}
@@ -510,7 +510,7 @@
     import nose
     nose.main()
   \end{lstlisting}
-\inctime{15}
+\inctime{10}
 \end{frame}
 
 \begin{frame}[fragile]
@@ -566,17 +566,20 @@
 \end{frame}
 
 \begin{frame}[fragile]
-    \frametitle{Exercise: Some more tests.}
+    \frametitle{Lets write some test!}
 \begin{lstlisting}    
-def test_function_ignore_spaces_in_text():
-    input = "ab raca carba"
-    assert is_palindrome(input) == True
+#for form of equation y=mx+c
+#given m and c for two equation,
+#finding the intersection point.
+def intersect(m1,c1,m2,c2):
+    x = (c2-c1)/(m1-m2)
+    y = m1*x+c1
+    return (x,y)
 \end{lstlisting}
-Check
 
-\PythonCode{$ nosetests test.py} 
+Create a simple test for this
 
-Tweak the code to pass this test.
+function which will make it fail.
 
 \inctime{15} 
 \end{frame}