bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
|
1185.33.89
by Martin Pool
[patch] add a selftest test that the setup build script works (Alexander Belchenko) |
1 |
""" test for setup.py build process """
|
2 |
||
3 |
import os |
|
4 |
import shutil |
|
5 |
||
6 |
from bzrlib.tests import TestCase |
|
7 |
||
8 |
||
9 |
class TestSetup(TestCase): |
|
10 |
||
11 |
def setUp(self): |
|
12 |
pass
|
|
13 |
||
14 |
def test_build(self): |
|
15 |
""" test cmd `python setup.py build` """ |
|
16 |
# run setup.py build as subproces and catch return code
|
|
17 |
p = os.popen("python setup.py build") |
|
18 |
s = p.readlines() |
|
19 |
res = p.close() |
|
20 |
self.assertEqual(res, None, '`python setup.py build` fails') |
|
21 |
||
22 |
def tearDown(self): |
|
23 |
""" cleanup build directory """ |
|
24 |
shutil.rmtree(u'build') |