Skip to content
Snippets Groups Projects
Commit 125acd95 authored by alicj's avatar alicj
Browse files

resolve issue #37, add details about tear down and setup

parent 4d3a1460
No related branches found
No related tags found
No related merge requests found
- coverage matrix
- statement matrix
- try to convert to beamer class
- keep the assignment as it is
- install pytest and coverage, if doesn¡¯t work, post questions on Avenue
-
\ No newline at end of file
No preview for this file type
......@@ -306,8 +306,8 @@ class TestCircles:
\end{frame}
\begin{frame}[fragile]
\frametitle{Redundant code in tests}
\begin{lstlisting}[language=Python]
\frametitle{Cleaned up code}
\begin{lstlisting}[language=Python, escapechar=!]
import pytest
from CircleADT import *
......@@ -327,6 +327,29 @@ class TestCircles:
\end{lstlisting}
\end{frame}
\begin{frame}[fragile]
\frametitle{Setup and Teardown}
\begin{itemize}
\item{\texttt{setup\_class(cls)}}
\begin{itemize}
\item{setup any state specific to the execution of the given class}
\end{itemize}
\item{\texttt{teardown\_class(cls)}}
\begin{itemize}
\item{teardown any state that was previously setup with a call to \texttt{setup\_class}.}
\end{itemize}
\item{\texttt{setup\_method(self, method)}}
\begin{itemize}
\item{setup any state tied to the execution of the given method in a class. \texttt{setup\_method} is invoked for every test method of a class.}
\end{itemize}
\item{\texttt{teardown\_method(self, method)}}
\begin{itemize}
\item{teardown any state that was previously setup with a \texttt{setup\_method} call.}
\end{itemize}
\end{itemize}
\end{frame}
\begin{frame}[fragile]
\frametitle{How much should I test?}
\begin{itemize}
......
{
"test.py::test_inc": true,
"test_3.py::TestCircles::()::test_xcoord_are_not_equal": true,
"test_circles.py::CirclesTests": true,
"test_circles2.py::TestClass::()::test_xcoord_are_equal": true,
"test_circles2.py::TestClass::()::test_xcoord_are_not_equal": true,
"test_statistics.py::StatisticsTests::testAverageOfCircles": true,
"test_statistics.py::StatisticsTests::test_rank": true,
"test_statistics.py::StatisticsTests::test_stdDev": true
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment