diff options
author | Shantanu | 2009-10-07 23:41:54 +0530 |
---|---|---|
committer | Shantanu | 2009-10-07 23:41:54 +0530 |
commit | b1b0251c7feaf256f372b617a6383448e673df5a (patch) | |
tree | 24f6d6061d6b30ea19509ed74558a868af3d2415 | |
parent | 2d5a4769b993164fd415fc21f84cdd464795cd28 (diff) | |
download | workshops-more-scipy-b1b0251c7feaf256f372b617a6383448e673df5a.tar.gz workshops-more-scipy-b1b0251c7feaf256f372b617a6383448e673df5a.tar.bz2 workshops-more-scipy-b1b0251c7feaf256f372b617a6383448e673df5a.zip |
Added testing examples in session-3.
-rw-r--r-- | day2/session3.tex | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/day2/session3.tex b/day2/session3.tex index d2daa20..988a427 100644 --- a/day2/session3.tex +++ b/day2/session3.tex @@ -22,7 +22,7 @@ \mode<presentation> { - \usetheme{CambridgeUS} + \usetheme{Warsaw} %\usetheme{Boadilla} %\usetheme{default} \useoutertheme{split} @@ -510,7 +510,7 @@ if __name__ == '__main__': import nose nose.main() \end{lstlisting} -\inctime{15} +\inctime{10} \end{frame} \begin{frame}[fragile] @@ -566,17 +566,20 @@ Tweak the code to pass this test. \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} |