[rfc] add a TestFactory class or concept

Jonathan Lange jml at canonical.com
Thu Aug 6 09:14:59 BST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Thu, Aug 6, 2009 at 9:12 AM, Martin Pool wrote:
> Lots of tests are run on some specific values; for instance they make
> a branch and then do some operations on it.
>
> I was talking to jml the other day and he said that Launchpad have a
> cleaner separation of all of this setup into a TestFactory class
> (iirc) - if you want a Person to test, you would always get that from
> the factory rather than putting arbitrary example data into the class.
>

See
http://bazaar.launchpad.net/~launchpad-pqm/launchpad/db-devel/annotate/head%3A/lib/lp/testing/factory.py

jml
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.8)

iQEcBAEBCAAGBQJKepECAAoJEKoj7DwqcnmX96wH/Ail2GhgDvNaCSY/mgubEBVO
ZMONSrsxjm4U5oIs35o42HdyiOx+uax8wuRzOHKL3oPXP3xX4oN/YV6/5G5jIS3X
LwgvEUMFRmmVVqL6Ap1JbAFMSyajwtSNXVMlx8/qxVgvVTZQI+NebHvBj1tOtqyt
QUzCXjDyQhrxEFQ3C862g//EEDItLCJVm0sjK7gcGyWO++HV9lt/2//EpgMowfTY
9xfp5L8REQ8+YkzY0r+v9OA3KEJfFbqG27Za9pTNngvk+pIj18A2ArTQOzk3dCCF
K3rWLvvKXndBR14nF+7Edt5z7eeiHzVpE398a2uCbRp7/X/x0/NagkvGszMCr3o=
=oOAp
-----END PGP SIGNATURE-----



More information about the bazaar mailing list