Commit Graph

18 Commits

Author SHA1 Message Date
Ezio Melotti cadff70ba5 #15421: fix an OverflowError in Calendar.itermonthdates() after datetime.MAXYEAR. Patch by Cédric Krier. 2012-09-21 17:26:35 +03:00
R. David Murray c45d7996db Merged revisions 83089,87590 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83089 | brett.cannon | 2010-07-23 09:54:14 -0400 (Fri, 23 Jul 2010) | 4 lines

  Test calendar.monthrange.

  Closes issue 9342. Thanks John Chandler for the patch.
........
  r87590 | r.david.murray | 2010-12-31 14:21:14 -0500 (Fri, 31 Dec 2010) | 4 lines

  #9361: add some tests for calendar.leapdays

  Patch by John Chandler.
........
2010-12-31 19:31:48 +00:00
Georg Brandl 837fbb0d9a Merged revisions 85731,85735 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85731 | georg.brandl | 2010-10-19 23:07:16 +0200 (Di, 19 Okt 2010) | 1 line

  Be consistent in the spelling of thread-safe(ty).
........
  r85735 | georg.brandl | 2010-10-20 08:50:19 +0200 (Mi, 20 Okt 2010) | 1 line

  Fix r85728: use "" to mean the system default locale, which should work on more systems.
........
2010-11-26 07:58:55 +00:00
Georg Brandl 79f096a7aa Merged revisions 85728 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85728 | georg.brandl | 2010-10-19 20:54:25 +0200 (Di, 19 Okt 2010) | 1 line

  #10092: Properly reset locale in Locale*Calendar classes.  The context manager was buggy because setlocale() returns the *new* locale, not the old.  Also add a test for this.
........
2010-11-26 07:57:57 +00:00
Florent Xicluna 1f3b4e12e8 Fix some py3k warnings in the standard library. 2010-03-07 12:14:25 +00:00
Antoine Pitrou e22997ec7c Silence a py3k warning claiming to affect Lib/calendar.py 2009-10-14 18:09:45 +00:00
Mark Dickinson 3e4caeb3bf Issue #5341: Fix a variety of spelling errors. 2009-02-21 20:27:01 +00:00
Walter Dörwald 6d20b705dd Fix test output. 2007-08-28 23:35:33 +00:00
Walter Dörwald bc96609555 Patch #1463288: use a context manager to temporarily switch locales.
Add tests for the output of the TextCalendar and HTMLCalendar classes.
2006-04-12 10:09:16 +00:00
Walter Dörwald 58917a6083 Bug #947906: An object oriented interface has been added to the calendar
module. It's possible to generate HTML calendar now and the module can be
called as a script (e.g. via ``python -mcalendar``).
2006-03-31 15:26:22 +00:00
Tim Peters bbc0d4409c SF bug 1065388: calendar day/month name lookup too slow
__getitem__() methods:  compute only the new spellings needed to satisfy
the given indexing object.  This is purely an optimization (it should
have no effect on visible semantics).
2004-11-13 16:18:32 +00:00
Walter Dörwald 302fa6dc0d Add another bunch of test cases for calendars with Sunday as the
first day of the week.
2004-07-08 17:14:17 +00:00
Walter Dörwald 59ad45689b Add tests that check the result of calendar.monthcalendar() for a set
of corner cases.
2004-07-02 19:00:09 +00:00
Walter Dörwald 21d3a32b99 Combine the functionality of test_support.run_unittest()
and test_support.run_classtests() into run_unittest()
and use it wherever possible.

Also don't use "from test.test_support import ...", but
"from test import test_support" in a few spots.

From SF patch #662807.
2003-05-01 17:45:56 +00:00
Barry Warsaw 04f357cffe Get rid of relative imports in all unittests. Now anything that
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. :)
2002-07-23 19:04:11 +00:00
Tim Peters 0c2c8e77fb SF bug 533234: tm_isdst > 1 Passed to strftime.
One more time on this turkey, but duller instead of cleverer.

Curious:  The docs say __getslice__ has been deprecated since 2.0, but
list.__getitem__ still doesn't work if you pass it a slice.  This makes
it a lot clearer to emulate a list by *being* a list <wink>.

Bugfix candidate.  Michael, just pile this patch on top of the others
that went by -- no need to try to pick these apart.
2002-03-23 03:26:53 +00:00
Skip Montanaro 693c6c44c4 added test case to catch index errors with _localized_name class 2002-03-15 03:57:04 +00:00
Fred Drake d077ca1e7c Very small test suite for the calendar module, mostly to check a constraint
on the return values from isleap().  Also checks firstweekday() and
setfirstweekday().
2001-12-12 05:38:08 +00:00