Skip to content

Commit

Permalink
Add handout for testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Feb 12, 2024
1 parent dd731d6 commit 1d9c675
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _topics/testing-of-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ note_urls:
video_urls:
- "Video demonstration of tutorial. - [YouTube](https://youtu.be/TaZYDG6Vags)"
---

A handout is available [here]({{site.baseurl}}/assets/handouts/spring/05-documentation/main.pdf).
Binary file added assets/handouts/spring/07-testing/main.pdf
Binary file not shown.
60 changes: 60 additions & 0 deletions assets/handouts/spring/07-testing/main.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
\documentclass{article}

\usepackage[margin=1.5cm, includefoot, footskip=30pt]{geometry}
\usepackage[parfill]{parskip}
\usepackage[black]{merriweather} %% Option 'black' gives heavier bold face
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{minted}

\pagenumbering{gobble}

\title{Computing for Mathematics: Handout 7}
\date{}

\begin{document}

\maketitle


This handout contains a summary of the topics covered as well as outline of
expected progress.

For further practice you can do the exercises available at
\href{https://vknight.org/pfm/building-tools/06-testing/exercises/main.html}{the
testing chapter of Python for Mathematics}.

\section{Expected progress}
\hrule

At the end of this week you should start writing your automated tests.

\begin{itemize}
\item Write your \mintinline{python}{test_<library>.py} file.
\item Include doctests in your \mintinline{md}{README.md} file.
\end{itemize}

\begin{center}
\framebox{
\textbf{At this stage I'd expect you to have tests for your library.}
}
\end{center}

\section{Summary}\label{summary}
\hrule

The programming topics covered in the
\href{https://vknight.org/pfm/building-tools/06-testing/introduction/main.html}{testing
chapter
} are:

% TODO

\begin{itemize}
\item Write an assert statement.
\item Write and run a test file.
\item Write doctests.
\item Run doctests.
\end{itemize}

\end{document}

0 comments on commit 1d9c675

Please sign in to comment.