~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

  • Committer: Patch Queue Manager
  • Date: 2014-04-03 07:45:32 UTC
  • mfrom: (6591.1.3 lp1030521)
  • Revision ID: pqm@pqm.ubuntu.com-20140403074532-0sdwrky6ie4y20l4
(vila) Use LooseVersion from distutils to check Pyrex/Cython version in
 order to handle non-integers in the version string. (Andrew Starr-Bochicchio)

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'))