File: doctest_example.py

package info (click to toggle)
python-xmlrunner 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 336 kB
  • sloc: python: 2,035; makefile: 215
file content (16 lines) | stat: -rw-r--r-- 230 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

def twice(n):
    """
    >>> twice(5)
    10
    """
    return 2 * n


class Multiplicator(object):
    def threetimes(self, n):
        """
        >>> Multiplicator().threetimes(5)
        15
        """
        return 3 * n