Line | |
---|
1 | # -*- coding: utf-8 -*- |
---|
2 | # |
---|
3 | # Copyright (C) 2005-2007 Christopher Lenz <cmlenz@gmx.de> |
---|
4 | # Copyright (C) 2007-2010 Edgewall Software |
---|
5 | # All rights reserved. |
---|
6 | # |
---|
7 | # This software is licensed as described in the file COPYING, which |
---|
8 | # you should have received as part of this distribution. The terms |
---|
9 | # are also available at http://bitten.edgewall.org/wiki/License. |
---|
10 | |
---|
11 | import os |
---|
12 | import shutil |
---|
13 | import tempfile |
---|
14 | import unittest |
---|
15 | import inspect |
---|
16 | |
---|
17 | from bitten.build import hgtools |
---|
18 | from bitten.recipe import Context |
---|
19 | |
---|
20 | |
---|
21 | class HgPullTestCase(unittest.TestCase): |
---|
22 | |
---|
23 | def setUp(self): |
---|
24 | self.basedir = os.path.realpath(tempfile.mkdtemp()) |
---|
25 | self.ctxt = Context(self.basedir) |
---|
26 | |
---|
27 | def tearDown(self): |
---|
28 | shutil.rmtree(self.basedir) |
---|
29 | |
---|
30 | def test_command_signature(self): |
---|
31 | self.assertEquals(inspect.getargspec(hgtools.pull), |
---|
32 | (['ctxt', 'revision', 'dir_'], None, None, (None, '.'))) |
---|
33 | |
---|
34 | def suite(): |
---|
35 | suite = unittest.TestSuite() |
---|
36 | suite.addTest(unittest.makeSuite(HgPullTestCase, 'test')) |
---|
37 | return suite |
---|
38 | |
---|
39 | if __name__ == '__main__': |
---|
40 | unittest.main(defaultTest='suite') |
---|
Note: See
TracBrowser
for help on using the repository browser.