Thanks for doing the reformatting. AFAICT the order of the content of
expected_failures is irrelevant, so you could as well order them
alphabetically, like imports.
I realize that this is twsited-related code, so there may be a reason why
LaunchpadTestCase(WithFactory) is not use. With it, you could use cool stuff
like "assertContentEqual" and could do without the "set" trick. So you know a
reason that this test uses unittest.TestCase?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Jonathan,
thank you for this improvement. The code looks good, I just have a little
suggestion and a question.
review approve code
Cheers,
Henning
Am 10.12.2010 22:18, schrieb j.c.sackett: registry/ scripts/ distributionmir ror_prober. py' registry/ scripts/ distributionmir ror_prober. py 2010-08-20 20:31:18 +0000 registry/ scripts/ distributionmir ror_prober. py 2010-12-10 21:18:14 +0000
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
[...]
> @@ -540,7 +552,12 @@ oberCallbacks( LoggingMixin) : eAfterRedirect,
>
> class MirrorCDImagePr
>
> - expected_failures = (BadResponseCode, ProberTimeout, ConnectionSkipped)
> + expected_failures = (
> + BadResponseCode,
> + ProberTimeout,
> + ConnectionSkipped,
> + UnknownURLSchem
> + )
Thanks for doing the reformatting. AFAICT the order of the content of
expected_failures is irrelevant, so you could as well order them
alphabetically, like imports.
> registry/ tests/test_ distributionmir ror_prober. py' registry/ tests/test_ distributionmir ror_prober. py 2010-11-22 13:55:32 +0000 registry/ tests/test_ distributionmir ror_prober. py 2010-12-10 21:18:14 +0000
> def __init__(self, mirror, distroseries, flavour, log_file):
> self.mirror = mirror
> @@ -735,4 +752,3 @@
> assert port.isdigit()
> port = int(port)
> return scheme, host, port, path
> -
>
> === modified file 'lib/lp/
> --- lib/lp/
> +++ lib/lp/
[...]
> @@ -651,10 +650,16 @@ Equal( callbacks. expected_ failures) , eCode, ProberTimeout, ConnectionSkipp ed])) eAfterRedirect,
> # some times.
> self.failUnless
> set(self.
> - set([BadRespons
> + set([
> + BadResponseCode,
> + ProberTimeout,
> + ConnectionSkipped,
> + UnknownURLSchem
> + ]))
I realize that this is twsited-related code, so there may be a reason why se(WithFactory) is not use. With it, you could use cool stuff qual" and could do without the "set" trick. So you know a
LaunchpadTestCa
like "assertContentE
reason that this test uses unittest.TestCase?
> exceptions = [BadResponseCod e(str(httplib. NOT_FOUND) ), localhost/ ', 5), ed()] ed(), eAfterRedirect( 'https:/ /localhost')] ensureOrDeleteM irrorCDImageSer ies( exception) )])
> ProberTimeout('http://
> - ConnectionSkipp
> + ConnectionSkipp
> + UnknownURLSchem
> for exception in exceptions:
> failure = self.callbacks.
> [(defer.FAILURE, Failure(
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
GON0ACgkQBT3oW1 L17ijBWACgiEnQu 82vvgPQQRqY56er jlpg kHn54TeYcRy49pZ dh
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk0
QY4An3xYVbKokM0
=egAt
-----END PGP SIGNATURE-----