/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to brzlib/tests/test_setup.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 12:41:27 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521124127-iv8etg0vwymyai6y
s/bzr/brz/ in apport config.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import sys
22
22
import subprocess
23
23
 
24
 
import breezy
25
 
from .. import tests
 
24
import brzlib
 
25
from brzlib import tests
26
26
 
27
27
# TODO: Run bzr from the installed copy to see if it works.  Really we need to
28
28
# run something that exercises every module, just starting it may not detect
30
30
#
31
31
# TODO: Check that the version numbers are in sync.  (Or avoid this...)
32
32
 
33
 
 
34
33
class TestSetup(tests.TestCaseInTempDir):
35
34
 
36
35
    def test_build_and_install(self):
41
40
        """
42
41
        # setup.py must be run from the root source directory, but the tests
43
42
        # are not necessarily invoked from there
44
 
        self.source_dir = os.path.dirname(os.path.dirname(breezy.__file__))
 
43
        self.source_dir = os.path.dirname(os.path.dirname(brzlib.__file__))
45
44
        if not os.path.isfile(os.path.join(self.source_dir, 'setup.py')):
46
 
            self.skipTest(
47
 
                'There is no setup.py file adjacent to the breezy directory')
 
45
            self.skip(
 
46
                'There is no setup.py file adjacent to the brzlib directory')
48
47
        try:
49
48
            import distutils.sysconfig
50
49
            makefile_path = distutils.sysconfig.get_makefile_filename()
51
50
            if not os.path.exists(makefile_path):
52
 
                self.skipTest(
 
51
                self.skip(
53
52
                    'You must have the python Makefile installed to run this'
54
53
                    ' test. Usually this can be found by installing'
55
54
                    ' "python-dev"')
56
55
        except ImportError:
57
 
            self.skipTest(
 
56
            self.skip(
58
57
                'You must have distutils installed to run this test.'
59
58
                ' Usually this can be found by installing "python-dev"')
60
59
        self.log('test_build running from %s' % self.source_dir)