Skip to content

Python 3.8 breaks datetime test #352

@konstin

Description

@konstin

From the travis ci build log:

=================================== FAILURES ===================================
___________________________ test_date_from_timestamp ___________________________
    @given(d=dates())
>   def test_date_from_timestamp(d):
tests/test_datetime.py:84: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
d = datetime.date(2000, 1, 1)
    @given(d=dates())
    def test_date_from_timestamp(d):
        ts = get_timestamp(pdt.datetime.combine(d, pdt.time(0)))
>       assert rdt.date_from_timestamp(int(ts)) == pdt.date.fromtimestamp(ts)
E       TypeError: an integer is required (got type tuple)
tests/test_datetime.py:86: TypeError
---------------------------------- Hypothesis ----------------------------------
Falsifying example: test_date_from_timestamp(d=datetime.date(2000, 1, 1))
================ 1 failed, 55 passed, 4 xfailed in 0.94 seconds ================
ERROR: InvocationError for command '/home/travis/build/PyO3/pyo3/examples/rustapi_module/.tox/py/bin/pytest' (exited with code 1)

I didn't check whether this is a bug in the alpha or a breaking change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions