launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04465
Re: Lighter tests with FakeLibrarian
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/24/2010 03:33 PM, Robert Collins wrote:
>> self.useContext(FakeLibrarian())
>
> I think both would be useful. I like context managers too, but
> sometimes (perhaps not this case) its easier to express with a little
> regular code in the middle.
I don't understand. What is the regular code in the middle? Is a
Context Manager not a superset of a fixture? If it is, surely we should
prefer context managers, so there is one obvious correct way of doing
things.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkx0H7kACgkQ0F+nu1YWqI2J1wCeNB7fSo4qMAF0x3mMvZx7saGb
aAMAn12nM+HPUjTrCvDSDUAtpqAJecof
=hETP
-----END PGP SIGNATURE-----
Follow ups
References