~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

  • Committer: Vincent Ladeuil
  • Date: 2014-04-02 16:12:44 UTC
  • mto: This revision was merged to the branch mainline in revision 6592.
  • Revision ID: v.ladeuil+lp@free.fr-20140402161244-loeovaqcu4e1dk6u
Minimal tests to cover using distutils.version.LooseVersion for pyrex.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Test for setup.py build process"""
18
18
 
 
19
from distutils import version
19
20
import os
20
21
import sys
21
22
import subprocess
79
80
        self.log('stderr: %r', stderr)
80
81
        self.assertEqual(0, p.returncode,
81
82
                         'invocation of %r failed' % args)
 
83
 
 
84
 
 
85
class TestDistutilsVersion(tests.TestCase):
 
86
 
 
87
    def test_version_with_string(self):
 
88
        # We really care about two pyrex specific versions and our ability to
 
89
        # detect them
 
90
        lv = version.LooseVersion
 
91
        self.assertTrue(lv("0.9.4.1") < lv('0.17.beta1'))
 
92
        self.assertTrue(lv("0.9.6.3") < lv('0.10'))