[pypy-commit] pypy py3k: lib_pypy/datetime.py was removed by b36f48bf48f8, kill the corresponding test too
antocuni
noreply at buildbot.pypy.org
Fri Feb 24 20:13:28 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r52873:0d6bda9ad805
Date: 2012-02-24 16:21 +0100
http://bitbucket.org/pypy/pypy/changeset/0d6bda9ad805/
Log: lib_pypy/datetime.py was removed by b36f48bf48f8, kill the
corresponding test too
diff --git a/pypy/module/test_lib_pypy/test_datetime.py b/pypy/module/test_lib_pypy/test_datetime.py
deleted file mode 100644
--- a/pypy/module/test_lib_pypy/test_datetime.py
+++ /dev/null
@@ -1,46 +0,0 @@
-"""Additional tests for datetime."""
-
-import py
-
-import time
-from lib_pypy import datetime
-import copy
-import os
-
-def test_utcfromtimestamp():
- """Confirm that utcfromtimestamp and fromtimestamp give consistent results.
-
- Based on danchr's test script in https://bugs.pypy.org/issue986
- """
- try:
- prev_tz = os.environ.get("TZ")
- os.environ["TZ"] = "GMT"
- for unused in xrange(100):
- now = time.time()
- delta = (datetime.datetime.utcfromtimestamp(now) -
- datetime.datetime.fromtimestamp(now))
- assert delta.days * 86400 + delta.seconds == 0
- finally:
- if prev_tz is None:
- del os.environ["TZ"]
- else:
- os.environ["TZ"] = prev_tz
-
-def test_utcfromtimestamp_microsecond():
- dt = datetime.datetime.utcfromtimestamp(0)
- assert isinstance(dt.microsecond, int)
-
-
-def test_integer_args():
- with py.test.raises(TypeError):
- datetime.datetime(10, 10, 10.)
- with py.test.raises(TypeError):
- datetime.datetime(10, 10, 10, 10, 10.)
- with py.test.raises(TypeError):
- datetime.datetime(10, 10, 10, 10, 10, 10.)
-
-def test_utcnow_microsecond():
- dt = datetime.datetime.utcnow()
- assert type(dt.microsecond) is int
-
- copy.copy(dt)
More information about the pypy-commit
mailing list