Kaydet (Commit) 85b2afb1 authored tarafından Ezio Melotti's avatar Ezio Melotti

#17690: merge with 3.3.

...@@ -465,10 +465,6 @@ class TestLocale(unittest.TestCase): ...@@ -465,10 +465,6 @@ class TestLocale(unittest.TestCase):
time.strftime("%B", (2009,2,1,0,0,0,0,0,0)) time.strftime("%B", (2009,2,1,0,0,0,0,0,0))
class _BaseYearTest(unittest.TestCase):
def yearstr(self, y):
raise NotImplementedError()
class _TestAsctimeYear: class _TestAsctimeYear:
_format = '%d' _format = '%d'
...@@ -526,7 +522,7 @@ class _TestStrftimeYear: ...@@ -526,7 +522,7 @@ class _TestStrftimeYear:
del skip_if_not_supported del skip_if_not_supported
class _Test4dYear(_BaseYearTest): class _Test4dYear:
_format = '%d' _format = '%d'
def test_year(self, fmt=None, func=None): def test_year(self, fmt=None, func=None):
...@@ -559,10 +555,10 @@ class _Test4dYear(_BaseYearTest): ...@@ -559,10 +555,10 @@ class _Test4dYear(_BaseYearTest):
self.assertRaises(OverflowError, self.yearstr, TIME_MINYEAR - 1) self.assertRaises(OverflowError, self.yearstr, TIME_MINYEAR - 1)
class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear): class TestAsctime4dyear(_TestAsctimeYear, _Test4dYear, unittest.TestCase):
pass pass
class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear): class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear, unittest.TestCase):
pass pass
...@@ -679,13 +675,6 @@ class TestPytime(unittest.TestCase): ...@@ -679,13 +675,6 @@ class TestPytime(unittest.TestCase):
self.assertIs(lt.tm_gmtoff, None) self.assertIs(lt.tm_gmtoff, None)
self.assertIs(lt.tm_zone, None) self.assertIs(lt.tm_zone, None)
def test_main():
support.run_unittest(
TimeTestCase,
TestLocale,
TestAsctime4dyear,
TestStrftime4dyear,
TestPytime)
if __name__ == "__main__": if __name__ == "__main__":
test_main() unittest.main()
...@@ -81,6 +81,9 @@ Tests ...@@ -81,6 +81,9 @@ Tests
- Issue #12820: add tests for the xml.dom.minicompat module. - Issue #12820: add tests for the xml.dom.minicompat module.
Patch by John Chandler and Phil Connell. 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? What's New in Python 3.3.1 release candidate 1?
=============================================== ===============================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment