annotate tests/doctest.txt @ 84:582ffe5e39a0

paint/package.py
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 17 Sep 2013 17:46:51 -0700
parents 1234bfb1f1f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
1 Test PaInt
23
90ef5d1ebff3 formatting
Jeff Hammel <jhammel@mozilla.com>
parents: 21
diff changeset
2 ==========
0
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
3
11
c41a946d34af stub out info method
Jeff Hammel <jhammel@mozilla.com>
parents: 10
diff changeset
4 The obligatory imports::
0
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
5
56
042a1b2a3e8a start flushing out tests
Jeff Hammel <jhammel@mozilla.com>
parents: 54
diff changeset
6 >>> import os
0
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
7 >>> import paint
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
8
11
c41a946d34af stub out info method
Jeff Hammel <jhammel@mozilla.com>
parents: 10
diff changeset
9 Get the dependencies of a package::
0
96362e527bd6 initial package
Jeff Hammel <jhammel@mozilla.com>
parents:
diff changeset
10
50
Jeff Hammel <jhammel@mozilla.com>
parents: 23
diff changeset
11 >>> jetperf = paint.Package('http://k0s.org/mozilla/hg/jetperf/archive/tip.tar.gz', verbose=False)
11
c41a946d34af stub out info method
Jeff Hammel <jhammel@mozilla.com>
parents: 10
diff changeset
12 >>> dependencies = jetperf.dependencies()
21
4df3e715817d now have passing tests again
Jeff Hammel <jhammel@mozilla.com>
parents: 11
diff changeset
13 >>> dependencies == {'mozharness': 'http://hg.mozilla.org/build/mozharness/archive/tip.tar.gz#egg=mozharness', 'talos': 'http://hg.mozilla.org/build/talos/archive/tip.tar.gz#egg=talos'}
4df3e715817d now have passing tests again
Jeff Hammel <jhammel@mozilla.com>
parents: 11
diff changeset
14 True
52
026d693cd561 cleanup
Jeff Hammel <jhammel@mozilla.com>
parents: 50
diff changeset
15 >>> jetperf._cleanup()
54
a8236b97abd3 separate methods for gathering package information
Jeff Hammel <jhammel@mozilla.com>
parents: 52
diff changeset
16
a8236b97abd3 separate methods for gathering package information
Jeff Hammel <jhammel@mozilla.com>
parents: 52
diff changeset
17 Test different ways of getting package information. First we'll use
a8236b97abd3 separate methods for gathering package information
Jeff Hammel <jhammel@mozilla.com>
parents: 52
diff changeset
18 an interface that overrides ``setuptools.setup``::
a8236b97abd3 separate methods for gathering package information
Jeff Hammel <jhammel@mozilla.com>
parents: 52
diff changeset
19
a8236b97abd3 separate methods for gathering package information
Jeff Hammel <jhammel@mozilla.com>
parents: 52
diff changeset
20 >>> import paint.info
56
042a1b2a3e8a start flushing out tests
Jeff Hammel <jhammel@mozilla.com>
parents: 54
diff changeset
21 >>> dummy_path = os.path.join(here, 'dummy')
042a1b2a3e8a start flushing out tests
Jeff Hammel <jhammel@mozilla.com>
parents: 54
diff changeset
22 >>> package_info = paint.info.SetupOverridePackageInfo(dummy_path)
57
d5e5c7496784 stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 56
diff changeset
23 >>> info = package_info()
d5e5c7496784 stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 56
diff changeset
24 >>> info['name']
d5e5c7496784 stubbing
Jeff Hammel <jhammel@mozilla.com>
parents: 56
diff changeset
25 'dummy'
59
acee5e882768 the egg-info tests fail. yay!
Jeff Hammel <jhammel@mozilla.com>
parents: 57
diff changeset
26
acee5e882768 the egg-info tests fail. yay!
Jeff Hammel <jhammel@mozilla.com>
parents: 57
diff changeset
27 Now let's use the .egg-info way::
acee5e882768 the egg-info tests fail. yay!
Jeff Hammel <jhammel@mozilla.com>
parents: 57
diff changeset
28
acee5e882768 the egg-info tests fail. yay!
Jeff Hammel <jhammel@mozilla.com>
parents: 57
diff changeset
29 >>> package_info = paint.info.EggInfo(dummy_path)
acee5e882768 the egg-info tests fail. yay!
Jeff Hammel <jhammel@mozilla.com>
parents: 57
diff changeset
30 >>> info = package_info()