[PATCH] test_timestamp.py changes for win32 (was: [rfc] time.gmtime()...)
Alexander Belchenko
bialix at ukr.net
Wed Apr 18 23:35:02 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley пишет:
> John Arbash Meinel wrote:
>> Alexander Belchenko wrote:
>> self.assertEqual('1969-12-31 19:00:00 -0500',
>> timestamp.format_patch_date(0, -5 * 3600))
>
>> It could easily be that this test wants to test how we handle negative
>> dates. (Just in case someone converts old code that is pre 1970).
>
> This test is not checking negative dates. 1969-12-31 19:00:00 -0500 is
> 1970-01-01 0:00:00 +0000, and we ought to be able to represent that on
> all platforms. So win32 seems to be broken (admittedly on an edge case.)
>
>> We shouldn't avoid the test on platforms where it succeeds. and
>> "knownFailure" gives us a way to say "yeah, this doesn't work on this
>> platform".
>
> I think KnownFailure is meant to reflect a bug in our code. A
> KnownFailure should always fail. It is an error for such a test to
> succeed when we expect it to fail.
>
> Since it relates to platforms, UnavailableFeature seems more appropriate.
Here the patch with GmtimeNegativeSecondsFeature.
Can someone check this patch on Linux?
(python bzr --no-plugins selftest test_timestamp -v)
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGJp0WzYr338mxwCURAgUnAKCR/NEbWNwMMFXREYrZNZfZGgzRYgCfYbQx
2RVXrLNNs8ss/fFF8qAU++w=
=NDSd
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gmtime.neg.sec.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20070419/40e3bed2/attachment-0001.diff
More information about the bazaar
mailing list