--- a/day2/session4.tex Tue Jun 29 00:30:21 2010 -0500
+++ b/day2/session4.tex Tue Jun 29 00:59:26 2010 -0500
@@ -202,6 +202,23 @@
\end{itemize}
\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Automating tests}
+ \begin{lstlisting}
+
+def gcd(a, b):
+ if a % b == 0:
+ return b
+ return gcd(b, a % b)
+
+if __name__ == '__main__':
+ assert gcd(15, 65) == 5
+ assert gcd(16, 76) == 4
+
+ \end{lstlisting}
+\end{frame}
+
\begin{frame}[fragile]
\frametitle{Automating tests}
\begin{lstlisting}
@@ -217,6 +234,18 @@
\end{lstlisting}
\end{frame}
+\begin{frame}[fragile]
+ \frametitle{Python Test Packages}
+ \begin{itemize}
+
+\item Python's \typ{unittest}:\linebreak
+ \url{http://docs.python.org/library/unittest.html}
+\linebreak
+\item \typ{nose}:\linebreak
+ \url{http://code.google.com/p/python-nose/}
+ \end{itemize}
+\end{frame}
+
\section{Coding Style}
\begin{frame}{Readability and Consistency}
\begin{itemize}