comparison tests/doctest.txt @ 13:f522620c6a78

now works properly with tarballs
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 08 Jul 2011 15:20:01 -0700
parents d1f090c5f291
children 996d579f0dc3
comparison
equal deleted inserted replaced
12:542b46ac4e28 13:f522620c6a78
12 >>> directory = tempfile.mkdtemp() 12 >>> directory = tempfile.mkdtemp()
13 13
14 Invoke carton:: 14 Invoke carton::
15 15
16 >>> os.chdir(directory) 16 >>> os.chdir(directory)
17 >>> packages = [os.path.join(here, i) for i in 'packageB', 'packageA'] 17 >>> packages = [os.path.join(here, i) for i in 'packageC.tar.gz', 'packageB', 'packageA']
18 >>> carton.main(['foo'] + packages) 18 >>> carton.main(['foo'] + packages)
19 >>> os.listdir('.') 19 >>> os.listdir('.')
20 ['foo.py'] 20 ['foo.py']
21 21
22 Invoke the foo.py it creates:: 22 Invoke the foo.py it creates::
27 >>> sorted(os.listdir('.')) 27 >>> sorted(os.listdir('.'))
28 ['foo', 'foo.py'] 28 ['foo', 'foo.py']
29 >>> os.path.isdir('foo') 29 >>> os.path.isdir('foo')
30 True 30 True
31 >>> sorted(os.listdir(os.path.join('foo', 'src'))) 31 >>> sorted(os.listdir(os.path.join('foo', 'src')))
32 ['packageA', 'packageB'] 32 ['packageA', 'packageB', 'packageC']
33 33
34 Clean up:: 34 Clean up::
35 35
36 >>> import shutil 36 >>> import shutil
37 >>> shutil.rmtree(directory) 37 >>> shutil.rmtree(directory)