[pypy-svn] r69739 - pypy/trunk/lib-python/modified-2.5.2/test
arigo at codespeak.net
arigo at codespeak.net
Sun Nov 29 19:28:25 CET 2009
Author: arigo
Date: Sun Nov 29 19:28:25 2009
New Revision: 69739
Modified:
pypy/trunk/lib-python/modified-2.5.2/test/test_strptime.py
Log:
Two more instances of r68747.
Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_strptime.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_strptime.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_strptime.py Sun Nov 29 19:28:25 2009
@@ -487,9 +487,9 @@
_strptime.strptime("10", "%d")
_strptime.strptime("2005", "%Y")
_strptime._TimeRE_cache.locale_time.lang = "Ni"
- original_time_re = id(_strptime._TimeRE_cache)
+ original_time_re = _strptime._TimeRE_cache
_strptime.strptime("10", "%d")
- self.failIfEqual(original_time_re, id(_strptime._TimeRE_cache))
+ self.assert_(original_time_re is not _strptime._TimeRE_cache)
self.failUnlessEqual(len(_strptime._regex_cache), 1)
def test_regex_cleanup(self):
@@ -508,11 +508,11 @@
def test_new_localetime(self):
# A new LocaleTime instance should be created when a new TimeRE object
# is created.
- locale_time_id = id(_strptime._TimeRE_cache.locale_time)
+ original_locale_time = _strptime._TimeRE_cache.locale_time
_strptime._TimeRE_cache.locale_time.lang = "Ni"
_strptime.strptime("10", "%d")
- self.failIfEqual(locale_time_id,
- id(_strptime._TimeRE_cache.locale_time))
+ self.assert_(original_locale_time
+ is not _strptime._TimeRE_cache.locale_time)
def test_TimeRE_recreation(self):
# The TimeRE instance should be recreated upon changing the locale.
More information about the Pypy-commit
mailing list