~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_setup.py

  • Committer: Alexander Belchenko
  • Date: 2006-08-11 07:25:20 UTC
  • mto: (1711.2.119 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1915.
  • Revision ID: bialix@ukr.net-20060811072520-27b5c3a8fead6758
test_setup: skip test if there is no 'setup.py' in current directory.
It's necessary for running selftest on bzr installed in system.

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