/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 breezy/tests/test_setup.py

  • Committer: Breezy landing bot
  • Author(s): Colin Watson
  • Date: 2020-11-16 21:47:08 UTC
  • mfrom: (7521.1.1 remove-lp-workaround)
  • Revision ID: breezy.the.bot@gmail.com-20201116214708-jos209mgxi41oy15
Remove breezy.git workaround for bazaar.launchpad.net.

Merged from https://code.launchpad.net/~cjwatson/brz/remove-lp-workaround/+merge/393710

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
import sys
22
22
import subprocess
23
23
 
24
 
import bzrlib
25
 
from bzrlib import tests
 
24
import breezy
 
25
from .. 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
 
33
34
class TestSetup(tests.TestCaseInTempDir):
34
35
 
35
36
    def test_build_and_install(self):
40
41
        """
41
42
        # setup.py must be run from the root source directory, but the tests
42
43
        # are not necessarily invoked from there
43
 
        self.source_dir = os.path.dirname(os.path.dirname(bzrlib.__file__))
 
44
        self.source_dir = os.path.dirname(os.path.dirname(breezy.__file__))
44
45
        if not os.path.isfile(os.path.join(self.source_dir, 'setup.py')):
45
 
            self.skip(
46
 
                'There is no setup.py file adjacent to the bzrlib directory')
 
46
            self.skipTest(
 
47
                'There is no setup.py file adjacent to the breezy directory')
47
48
        try:
48
49
            import distutils.sysconfig
49
50
            makefile_path = distutils.sysconfig.get_makefile_filename()
50
51
            if not os.path.exists(makefile_path):
51
 
                self.skip(
 
52
                self.skipTest(
52
53
                    'You must have the python Makefile installed to run this'
53
54
                    ' test. Usually this can be found by installing'
54
55
                    ' "python-dev"')
55
56
        except ImportError:
56
 
            self.skip(
 
57
            self.skipTest(
57
58
                'You must have distutils installed to run this test.'
58
59
                ' Usually this can be found by installing "python-dev"')
59
60
        self.log('test_build running from %s' % self.source_dir)