File: test_lib_version.py

package info (click to toggle)
thuban 1.2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,752 kB
  • sloc: python: 30,427; ansic: 6,181; xml: 4,127; cpp: 1,595; makefile: 166
file content (33 lines) | stat: -rw-r--r-- 814 bytes parent folder | download | duplicates (6)
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
# Copyright (C) 2003 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh@intevation.de>
#
# This program is free software under the GPL (>=v2)
# Read the file COPYING coming with the software for details.

""""""

__version__ = "$Revision: 2011 $"
# $Source$
# $Id: test_lib_version.py 2011 2003-12-03 09:46:27Z bh $

import unittest

import support
support.initthuban()

from Thuban.Lib.version import make_tuple


class TestMakeTuple(unittest.TestCase):

    def test(self):
        """Test Thuban.version.make_tuple()"""
        self.assertEquals(make_tuple("1.2"), (1, 2))
        self.assertEquals(make_tuple("1.2.3"), (1, 2, 3))
        self.assertEquals(make_tuple("2.4.0.7"), (2, 4, 0))
        self.assertEquals(make_tuple("1.2+cvs.20031111"), (1, 2))


if __name__ == "__main__":
    support.run_tests()