~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

[merge] Belchenko: setup.py fixes for running test suite after being installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import shutil
23
23
from tempfile import TemporaryFile
24
24
 
25
 
from bzrlib.tests import TestCase
 
25
from bzrlib.tests import TestCase, TestSkipped
26
26
import bzrlib.osutils as osutils
27
27
 
28
28
# TODO: ideally run this in a separate directory, so as not to clobber the
36
36
        This tests that the build process and man generator run correctly.
37
37
        It also can catch new subdirectories that weren't added to setup.py.
38
38
        """
 
39
        if not os.path.isfile('setup.py'):
 
40
            raise TestSkipped('There is no setup.py file in current directory')
 
41
 
39
42
        self.log('test_build running in %s' % os.getcwd())
40
43
        try:
41
44
            # run setup.py build as subproces and catch return code