summaryrefslogtreecommitdiff
path: root/tests/version_comparison_test.py
blob: f13a53c0fbdce14cf375f792f5e203b83652792e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import unittest

from . import util

class VersionComparisonTest(unittest.TestCase):
    def test_comparison(self):
        assert util.version_less_than_spec((7, 22, 0), (7, 23, 0))
        assert util.version_less_than_spec((7, 22, 0), (7, 23))
        assert util.version_less_than_spec((7, 22, 0), (7, 22, 1))
        assert not util.version_less_than_spec((7, 22, 0), (7, 22, 0))
        assert not util.version_less_than_spec((7, 22, 0), (7, 22))