[Python-checkins] cpython (merge 3.3 -> default): #17690: merge with 3.3.
ezio.melotti
python-checkins at python.org
Thu Apr 11 19:31:03 CEST 2013
http://hg.python.org/cpython/rev/6cc56e21a74d
changeset: 83250:6cc56e21a74d
parent: 83248:c1402fae0b02
parent: 83249:20efcabcd5c0
user: Ezio Melotti <ezio.melotti at gmail.com>
date: Thu Apr 11 20:30:48 2013 +0300
summary:
#17690: merge with 3.3.
files:
Lib/test/test_time.py | 19 ++++---------------
Misc/NEWS | 3 +++
2 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -465,10 +465,6 @@
time.strftime("%B", (2009,2,1,0,0,0,0,0,0))
-class _BaseYearTest(unittest.TestCase):
- def yearstr(self, y):
- raise NotImplementedError()
-
class _TestAsctimeYear:
_format = '%d'
@@ -526,7 +522,7 @@
del skip_if_not_supported
-class _Test4dYear(_BaseYearTest):
+class _Test4dYear:
_format = '%d'
def test_year(self, fmt=None, func=None):
@@ -559,10 +555,10 @@
self.assertRaises(OverflowError, self.yearstr, TIME_MINYEAR - 1)
-class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear):
+class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear, unittest.TestCase):
pass
-class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear):
+class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear, unittest.TestCase):
pass
@@ -679,13 +675,6 @@
self.assertIs(lt.tm_gmtoff, None)
self.assertIs(lt.tm_zone, None)
-def test_main():
- support.run_unittest(
- TimeTestCase,
- TestLocale,
- TestAsctime4dyear,
- TestStrftime4dyear,
- TestPytime)
if __name__ == "__main__":
- test_main()
+ unittest.main()
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -81,6 +81,9 @@
- Issue #12820: add tests for the xml.dom.minicompat module.
Patch by John Chandler and Phil Connell.
+- Issue #17690: test_time now works with unittest test discovery.
+ Patch by Zachary Ware.
+
What's New in Python 3.3.1 release candidate 1?
===============================================
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list