comparison tests/doctest.txt @ 24:bb19d3dac4c5

fix tests
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 10 Jul 2011 18:17:54 -0700
parents e2c9a9a4d524
children e2db2913123d
comparison
equal deleted inserted replaced
23:987086aad234 24:bb19d3dac4c5
31 >>> sorted(os.listdir(os.path.join('foo', 'src'))) 31 >>> sorted(os.listdir(os.path.join('foo', 'src')))
32 ['packageA', 'packageB', 'packageC'] 32 ['packageA', 'packageB', 'packageC']
33 33
34 Find a console script. This shows installation went well:: 34 Find a console script. This shows installation went well::
35 35
36 >>> bin = [os.path.join('foo', i) for i in ('bin', 'Scripts) if os.path.exists(os.path.join('foo', i))][0] 36 >>> bin = [os.path.join('foo', i) for i in ('bin', 'Scripts') if os.path.exists(os.path.join('foo', i))][0]
37 >>> os.path.exists(bin) # just to make sure 37 >>> os.path.isdir(bin)
38 True
38 >>> os.path.exists(os.path.join(bin, 'packageA')) or os.path.exists(os.path.join(bin, 'packageA.exe')) 39 >>> os.path.exists(os.path.join(bin, 'packageA')) or os.path.exists(os.path.join(bin, 'packageA.exe'))
39 True 40 True
40 41
41 Show that non-package files get carried along too:: 42 Show that non-package files get carried along too::
42 43
53 0 54 0
54 >>> os.path.exists('fleem') and os.path.isdir('fleem') 55 >>> os.path.exists('fleem') and os.path.isdir('fleem')
55 True 56 True
56 >>> srcdir = os.path.join('fleem', 'src') 57 >>> srcdir = os.path.join('fleem', 'src')
57 >>> packageA = os.path.join(srcdir, [i for i in os.listdir(srcdir) if i.startswith('packageA')][0]) 58 >>> packageA = os.path.join(srcdir, [i for i in os.listdir(srcdir) if i.startswith('packageA')][0])
58 >>> os.path.exists(os.path.join(packageA 'foo.txt')) 59 >>> os.path.exists(os.path.join(packageA, 'foo.txt'))
59 False 60 False
60 61
61 Clean up:: 62 Clean up::
62 63
63 >>> import shutil 64 >>> import shutil