Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add handout for testing. #344

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
Loading