summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_strftime.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-15/+15
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-1/+1
| | | | (Rough first cut.)
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-2/+2
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Deal with case of when locale time values has characters that can be mistakenBrett Cannon2004-03-201-2/+14
| | | | | for regex syntax. Fixes bug #883604 .
* Have strftime() check its time tuple argument to make sure the tuple's valuesBrett Cannon2004-03-021-1/+1
| | | | | | | | | | are within proper boundaries as specified in the docs. This can break possible code (datetime module needed changing, for instance) that uses 0 for values that need to be greater 1 or greater (month, day, and day of year). Fixes bug #897625.
* Get rid of relative imports in all unittests. Now anything thatBarry Warsaw2002-07-231-1/+1
| | | | | | | | | | | imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
* The first batch of changes recommended by the fixdiv tool. These areGuido van Rossum2001-09-041-2/+2
| | | | | mostly changes of / operators into //. Once or twice I did more or less than recommended.
* main(): Application of SF patch #405851, which allows this test to beBarry Warsaw2001-03-231-0/+12
| | | | | | | used by Jython. The tests in this module expect C locale, so be explicit about setting that (for CPython). However, in Jython, there is no C locale, so instead be explicit about setting the US locale. Closes the patch.
* String method conversion.Eric S. Raymond2001-02-091-2/+2
|
* a bold attempt to fix things broken by MAL's verify patch: importFredrik Lundh2001-01-171-1/+1
| | | | 'verify' iff it's used by a test module...
* This patch removes all uses of "assert" in the regression test suiteMarc-André Lemburg2001-01-171-1/+1
| | | | | | | and replaces them with a new API verify(). As a result the regression suite will also perform its tests in optimization mode. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Allow am/pm as well as AM/PM (C9X behaviour).Jack Jansen2000-09-151-2/+2
|
* # Bah. The same problem occurred a second time.Guido van Rossum1999-04-081-1/+1
|
* On Windows, we suddenly find, strftime() may return "" for anGuido van Rossum1999-04-081-1/+1
| | | | | | | unsupported format string. (I guess this is because the logic for deciding whether to reallocate the buffer or not has been improved.) This caused the test code to crash on result[0]. Fix this by assuming an empty result also means the format is not supported.
* Patch by Marc-Andre Lemburg: use re module to compare test results.Guido van Rossum1998-09-141-5/+5
| | | | | This makes it possible to accept that on Linux %w returns "01" instead of "1", for example.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-85/+85
|
* Move %x test to nonstandard section because it appears to be locale specific.Guido van Rossum1997-12-151-2/+3
|
* Tweaks to cope with strftime returning 0 without error for %ZGuido van Rossum1997-08-181-1/+1
|
* Moved some non-standard format characters out of the standard list.Guido van Rossum1997-08-141-20/+22
| | | | | | | Also moved %c and %Z out of there, even though they are standard, because these are locale dependent (and e.g. on Windows and Mac they return different strings). Finally, sorted the tables slightly different, to match my standard docs better (%a before %A).
* Fixes for the Mac. (Jack)Guido van Rossum1997-08-121-3/+6
|
* Changes to make these tests work on the Mac.Guido van Rossum1997-05-161-2/+2
|
* Fix typo in error reporting.Guido van Rossum1997-05-141-1/+1
|
* Catch and report ValueError raised by strftime.Guido van Rossum1997-04-111-4/+16
|
* Much more rigorous testing -- we now try many times, varying in timeGuido van Rossum1997-03-071-86/+97
| | | | | | | | | | | | | of day, day of week, and season. Fix the weekday predictions -- these seemed to be all bogus. The new predictions seem to correspond with strftime() on Solaris and IRIX, so I believe they are correct. Get rid of the test for non-standard format %C returning "the same as date(1)". This is hard to do reliably without opening a pipe to date, and moreover, on IRIX 6.2, %C yields the Century. So we use that instead. (We don't complain about this in non-verbose mode anyway.)
* Remove %n and %t from the list of standard expectations.Guido van Rossum1997-02-191-2/+0
|
* Import verbose flag from test_support instead of testing __name__.Guido van Rossum1996-12-201-5/+1
|
* Different operation in verbose mode: show the supported nonstandardGuido van Rossum1996-12-181-2/+16
| | | | options. Also added two: %n and %t (newline and tab character).
* nonstandard_expectations is only added when in verbose mode, so weBarry Warsaw1996-12-131-2/+1
| | | | | don't need the if test for verbosity when checking for results of an unsupported option.
* Hmm, now that I think about it, we *can* use time.time() and 'date' ifBarry Warsaw1996-12-131-6/+8
| | | | running verbose.
* More or less portabilized.Barry Warsaw1996-12-131-7/+11
| | | | | | | | 1. If a conversion isn't supported on the current platform, just ignore it, unless running as a script (i.e. verbose) 2. Don't use time.time() and os.popen('date') to get the raw values. These will always be different!
* Fixed test_strftime to be silent when called from autotest.Guido van Rossum1996-12-121-5/+15
|
* Added test_strftime (Skip Montanaro).Guido van Rossum1996-12-121-0/+82