Skip to content

Commit 5f45a69

Browse files
committed
PYTHON-2150 Fix test_timestamp_values on Jython
1 parent da778c5 commit 5f45a69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/test_objectid.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ def generate_objectid_with_timestamp(timestamp):
189189

190190
for tstamp, exp_datetime_args in TEST_DATA.items():
191191
oid = generate_objectid_with_timestamp(tstamp)
192-
if tstamp > 0x7FFFFFFF and sys.maxsize < 2**32:
192+
if (not sys.platform.startswith("java") and
193+
tstamp > 0x7FFFFFFF and sys.maxsize < 2**32):
193194
# 32-bit platforms will overflow in datetime.fromtimestamp.
194195
with self.assertRaises((OverflowError, ValueError)):
195196
oid.generation_time

0 commit comments

Comments
 (0)