~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/__init__.py

  • Committer: Martin Pool
  • Date: 2008-03-16 08:25:21 UTC
  • mto: (3280.2.2 prepare-1.3)
  • mto: This revision was merged to the branch mainline in revision 3284.
  • Revision ID: mbp@sourcefrog.net-20080316082521-xmex8wq1uyj6cxyh
Fix doctest syntax

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    This also checks that the version is reasonable: the sub-release must be
56
56
    zero for final releases, and non-zero for alpha, beta and preview.
57
57
 
58
 
    >>> _format_version_tuple(1, 0, 0, 'final', 0)
59
 
    "1.0"
60
 
    >>> _format_version_tuple(1, 2, 0, 'dev', 0)
61
 
    "1.2dev"
62
 
    >>> _format_version_tuple(1, 1, 1, 'candidate', 2)
63
 
    "1.1.1rc2"
 
58
    >>> print _format_version_tuple((1, 0, 0, 'final', 0))
 
59
    1.0
 
60
    >>> print _format_version_tuple((1, 2, 0, 'dev', 0))
 
61
    1.2dev
 
62
    >>> print _format_version_tuple((1, 1, 1, 'candidate', 2))
 
63
    1.1.1rc2
64
64
    """
65
65
    if version_info[2] == 0:
66
66
        main_version = '%d.%d' % version_info[:2]