Author: Ronan Lamy <[email protected]>
Branch: cleanup-test_lib_pypy
Changeset: r95413:8b124f6d8e41
Date: 2018-12-05 03:54 +0000
http://bitbucket.org/pypy/pypy/changeset/8b124f6d8e41/
Log: Fix test to not require a random external library
diff --git a/pypy/module/test_lib_pypy/test_datetime.py
b/pypy/module/test_lib_pypy/test_datetime.py
--- a/pypy/module/test_lib_pypy/test_datetime.py
+++ b/pypy/module/test_lib_pypy/test_datetime.py
@@ -248,10 +248,10 @@
assert str(exc.value) == "can't compare offset-naive and offset-aware
times"
def test_future_types_newint():
- try:
- from future.types.newint import newint
- except ImportError:
- skip('requires future')
+ # Issue 2193
+ class newint(long):
+ def __int__(self):
+ return self
dt_from_ints = datetime.datetime(2015, 12, 31, 12, 34, 56)
dt_from_newints = datetime.datetime(newint(2015), newint(12), newint(31),
newint(12), newint(34), newint(56))
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit