Changeset 1440 in tailor
- Timestamp:
- 07/25/07 20:55:53 (6 years ago)
- Hash name:
- 20070725185553-138f5-339a0a57fcd950d4dad20276b8c617d5785f1ab6
- Location:
- vcpx/tests
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
vcpx/tests/config.py
r1384 r1440 13 13 "Test the configuration system" 14 14 15 TESTDIR = None 16 15 17 def setUp(self): 16 18 from os import mkdir, getcwd 17 19 from os.path import exists, split, join 20 from tempfile import gettempdir 18 21 from atexit import register 19 22 from shutil import rmtree 20 23 24 self.TESTDIR = join(gettempdir(), 'tailor-tests') 25 21 26 tailor_repo = getcwd() 22 while tailor_repo != '/'and not exists(join(tailor_repo, '_darcs')):27 while tailor_repo != split(tailor_repo)[0] and not exists(join(tailor_repo, '_darcs')): 23 28 tailor_repo = split(tailor_repo)[0] 24 29 assert exists(join(tailor_repo, '_darcs')), "Tailor Darcs repository not found!" 25 30 self.tailor_repo = tailor_repo 26 if not exists( '/tmp/tailor-tests'):27 mkdir( '/tmp/tailor-tests')28 register(rmtree, '/tmp/tailor-tests')31 if not exists(self.TESTDIR): 32 mkdir(self.TESTDIR) 33 register(rmtree, self.TESTDIR) 29 34 30 35 def getTestConfiguration(self, testname): … … 47 52 48 53 project1 = Project('project1', config) 49 self.assertEqual(project1.rootdir, '/tmp/tailor-tests')54 self.assertEqual(project1.rootdir, self.TESTDIR) 50 55 self.assertEqual(project1.source.name, 'svn:project1repo') 51 56 self.assertEqual(project1.target.name, 'darcs:project1') … … 113 118 """Verify that the state file is computed the way it should""" 114 119 115 from os.path import expanduser 120 from os.path import expanduser, join 116 121 117 122 config = Config(self.getTestConfiguration("config-basic_test"), … … 119 124 120 125 project1 = Project('project1', config) 121 self.assertEqual(project1.state_file.filename, '/tmp/tailor-tests/project1.state')126 self.assertEqual(project1.state_file.filename, join(self.TESTDIR, 'project1.state')) 122 127 project3 = Project('project3', config) 123 self.assertEqual(project3.state_file.filename, '/tmp/tailor-tests/_darcs/tailor.state')128 self.assertEqual(project3.state_file.filename, join(self.TESTDIR, '_darcs', 'tailor.state')) 124 129 project4 = Project('project4', config) 125 130 self.assertEqual(project4.state_file.filename, expanduser('~/tailorize/project4.state')) -
vcpx/tests/tailor.py
r1408 r1440 323 323 class OperationalTest(TestCase): 324 324 325 TESTDIR = '/tmp/tailor-tests'325 TESTDIR = None 326 326 327 327 def setUp(self): 328 328 from os import mkdir, getcwd 329 329 from os.path import exists, split, join 330 from tempfile import gettempdir 330 331 from atexit import register 331 332 from shutil import rmtree 332 333 from vcpx.tests import DEBUG 333 334 335 self.TESTDIR = join(gettempdir(), 'tailor-tests') 336 334 337 tailor_repo = getcwd() 335 while tailor_repo != '/'and not exists(join(tailor_repo, '_darcs')):338 while tailor_repo != split(tailor_repo)[0] and not exists(join(tailor_repo, '_darcs')): 336 339 tailor_repo = split(tailor_repo)[0] 337 340 assert exists(join(tailor_repo, '_darcs')), "Tailor Darcs repository not found!" … … 426 429 427 430 def testBazaarAndPython23(self): 428 " Test we detect early when running under Python < 2.4"431 "Bazaar test we detect early when running under Python < 2.4" 429 432 430 433 from sys import version_info -
vcpx/tests/fixed_bugs.py
r1280 r1440 19 19 """Ensure already fixed bugs don't get reintroduced""" 20 20 21 TESTDIR = '/tmp/tailor-tests/fixed-bugs'21 TESTDIR = None 22 22 23 23 ALL_TARGET_VCS = [ 'arx', 'bzr', 'cdv', 'cg', 'cvs', 'cvsps', 'darcs', 'git', 'hg', 'monotone', 'svn' ] … … 42 42 def setUp(self): 43 43 from os import makedirs 44 from tempfile import gettempdir 44 45 from shutil import rmtree 45 46 from atexit import register 47 48 self.TESTDIR = join(gettempdir(), 'tailor-tests', 'fixed-bugs') 46 49 47 50 self.test_name = self.id().split('.')[-1]
Note: See TracChangeset
for help on using the changeset viewer.
