Rev 4868: (mbp) Fix skip criteria for bzrlib.tests.test_setup (Max Bowsher) in file:///home/pqm/archives/thelove/bzr/2.1/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Oct 15 04:04:28 BST 2010
At file:///home/pqm/archives/thelove/bzr/2.1/
------------------------------------------------------------
revno: 4868 [merge]
revision-id: pqm at pqm.ubuntu.com-20101015030427-70zuki5lqgsnejtb
parent: pqm at pqm.ubuntu.com-20101008110247-f1pwblmyob53ae6f
parent: maxb at f2s.com-20101014213447-ii2if26gljdaq1n3
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: 2.1
timestamp: Fri 2010-10-15 04:04:27 +0100
message:
(mbp) Fix skip criteria for bzrlib.tests.test_setup (Max Bowsher)
modified:
bzrlib/tests/test_setup.py test_setup.py-20051208073730-4a59a6368c4efa04
=== modified file 'bzrlib/tests/test_setup.py'
--- a/bzrlib/tests/test_setup.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_setup.py 2010-10-14 21:34:47 +0000
@@ -43,8 +43,11 @@
This tests that the build process and man generator run correctly.
It also can catch new subdirectories that weren't added to setup.py.
"""
- if not os.path.isfile('setup.py'):
- raise TestSkipped('There is no setup.py file in current directory')
+ # setup.py must be run from the root source directory, but the tests
+ # are not necessarily invoked from there
+ self.source_dir = os.path.dirname(os.path.dirname(bzrlib.__file__))
+ if not os.path.isfile(os.path.join(self.source_dir, 'setup.py')):
+ raise TestSkipped('There is no setup.py file adjacent to the bzrlib directory')
try:
import distutils.sysconfig
makefile_path = distutils.sysconfig.get_makefile_filename()
@@ -56,9 +59,6 @@
' Usually this can be found by installing "python-dev"')
self.log('test_build running in %s' % os.getcwd())
install_dir = osutils.mkdtemp()
- # setup.py must be run from the root source directory, but the tests
- # are not necessarily invoked from there
- self.source_dir = os.path.dirname(os.path.dirname(bzrlib.__file__))
try:
self.run_setup(['clean'])
# build is implied by install
More information about the bazaar-commits
mailing list