[pypy-dev] datetime module

David Fraser davidf at sjsoft.com
Fri Feb 4 09:20:16 CET 2005


Hi

I have been testing out pypy for the first time...
I wanted to get the datetime module working and found that there was a 
pure python implementation of it done before the C implementation, in 
the nondist/sandbox/datetime module on Python CVS.
This implementation works fairly well on pypy:
- in order to test it, the attached patch to test_datetime is needed to 
avoid problems with pickle and gc
- other than pickling, the only test failures are below
The datetime.py can be got directly here:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/python/python/nondist/sandbox/datetime/datetime.py?content-type=text%2Fplain&rev=1.160

======================================================================
ERROR: test_combine (__main__.TestDateTime)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_datetime.py", line 1396, in test_combine
    dt = combine(time=t, date=d)
TypeError: newfunc() got 2 unexpected keyword arguments

======================================================================
ERROR: test_more_astimezone (__main__.TestDateTimeTZ)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_datetime.py", line 2636, in test_more_astimezone
    dt = self.theclass.now(tz=f44m)
TypeError: newfunc() got an unexpected keyword argument 'tz'

======================================================================
ERROR: test_tzinfo_fromtimestamp (__main__.TestDateTimeTZ)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_datetime.py", line 2423, in test_tzinfo_fromtimestamp
    again = meth(ts, tz=off42)
TypeError: newfunc() got an unexpected keyword argument 'tz'

======================================================================
ERROR: test_tzinfo_now (__main__.TestDateTimeTZ)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_datetime.py", line 2385, in test_tzinfo_now
    again = meth(tz=off42)
TypeError: newfunc() got an unexpected keyword argument 'tz'

======================================================================
FAIL: test_subclass_timedelta (__main__.TestTimeDelta)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_datetime.py", line 469, in test_subclass_timedelta
    self.assert_(type(t3) is timedelta)
  File 
"/share/sjsoft/code/Python/pypy/dist-pypy/lib-python-2.3.4/unittest.py", 
line 278, in failUnless
    if not expr: raise self.failureException, msg
AssertionError

David


More information about the Pypy-dev mailing list