self = <swh.storage.tests.test_postgresql.TestStorage object at 0x7fc30c3df7b8>
swh_storage = <swh.storage.postgresql.storage.Storage object at 0x7fc0af668e10>
@settings(
> suppress_health_check=[HealthCheck.too_slow, HealthCheck.data_too_large]
+ function_scoped_fixture_check,
)
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1734:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox/py3/lib/python3.7/site-packages/swh/storage/tests/storage_tests.py:1758: in test_release_add_get_arbitrary
swh_storage.release_add(releases)
.tox/py3/lib/python3.7/site-packages/swh/core/db/common.py:73: in _meth
return meth(self, *args, db=db, cur=cur, **kwargs)
.tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/storage.py:843: in release_add
db_releases_filtered = list(map(converters.release_to_db, releases_filtered))
.tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/converters.py:271: in release_to_db
date = date_to_db(release.date)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ts_with_tz = TimestampWithTimezone(timestamp=Timestamp(seconds=253402300800, microseconds=0), offset_bytes=b'+0000')
def date_to_db(ts_with_tz: Optional[TimestampWithTimezone]) -> Dict[str, Any]:
"""Convert a swh-model date_offset to its DB representation.
Args:
ts_with_tz: a TimestampWithTimezone object
Returns:
dict: a dictionary with these keys:
- timestamp: a date in ISO format
- offset_bytes: a byte representation of the latter two, usually as "+HHMM"
or "-HHMM"
"""
if ts_with_tz is None:
return DEFAULT_DATE
ts = ts_with_tz.timestamp
> timestamp = datetime.datetime.fromtimestamp(ts.seconds, datetime.timezone.utc)
E ValueError: year 10000 is out of range
E Falsifying example: test_release_add_get_arbitrary(
E releases=[Release(name=b'', message=None, target=hash_to_bytes('0000000000000000000000000000000000000000'), target_type=ObjectType.CONTENT, synthetic=False, author=Person(fullname=b'', name=None, email=None), date=TimestampWithTimezone(timestamp=Timestamp(seconds=253402300800, microseconds=0), offset_bytes=b'+0000'), metadata=None, id=hash_to_bytes('7926caff944a7f6dc0273234ce7326e903b2dde8'), raw_manifest=None)],
E self=<swh.storage.tests.test_postgresql.TestStorage at 0x7fc30c3df7b8>,
E swh_storage=<swh.storage.postgresql.storage.Storage at 0x7fc0af668e10>,
E )
.tox/py3/lib/python3.7/site-packages/swh/storage/postgresql/converters.py:145: ValueError
TEST RESULT
TEST RESULT
- Run At
- Aug 4 2022, 2:25 PM