File: skip_all.tex

package info (click to toggle)
pytest-doctestplus 1.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 352 kB
  • sloc: python: 2,004; makefile: 13; sh: 7
file content (54 lines) | stat: -rw-r--r-- 856 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
% doctest-skip-all

\documentclass{article}
\setlength{\parindent}{0cm}

\usepackage{listings}
\lstnewenvironment{python}[1][]{
\lstset{
language=python,
}}{}

\begin{document}

\section{Some Bad Test Cases}

All of the example code blocks in this file are going to fail if they run. So
if the directive used at the top of this file does not work, then there are
going to be test failures.

\subsection{Undefined Variables}

This one will fail because the variables haven't been defined::

\begin{python}
>>> x + y
5

\end{python}


\subsection{No Such Module}

This one will fail because there's (probably) no such module::

\begin{python}
>>> import foobar
>>> foobar.baz(42)
0

\end{python}


\section{What???}

This one will fail because it's just not valid python::

\begin{python}
>>> NOT VALID PYTHON, OKAY?
>>> + 5
10

\end{python}

\end{document}