Back to index

python3.2  3.2.2
Classes | Functions
test.test_doctest2 Namespace Reference

Classes

class  C

Functions

def test_main

Detailed Description

A module to test whether doctest recognizes some 2.2 features,
like static and class methods.

>>> print('yup')  # 1
yup

We include some (random) encoded (utf-8) text in the text surrounding
the example.  It should be ignored:

ЉЊЈЁЂ

Function Documentation

Definition at line 110 of file test_doctest2.py.

00110 
00111 def test_main():
00112     from test import test_doctest2
00113     EXPECTED = 19
00114     f, t = support.run_doctest(test_doctest2)
00115     if t != EXPECTED:
00116         raise support.TestFailed("expected %d tests to run, not %d" %
00117                                       (EXPECTED, t))
00118 
00119 # Pollute the namespace with a bunch of imported functions and classes,
# to make sure they don't get tested.