posit-dev / great-tables

Make awesome display tables using Python.
https://posit-dev.github.io/great-tables/
MIT License
1.43k stars 48 forks source link

Verify fmt_datetime iso cases are in tests #299

Closed machow closed 2 months ago

machow commented 2 months ago

Let's verify in the test suite that these cases exist:

https://github.com/posit-dev/great-tables/pull/290#issuecomment-2061688722

rich-iannone commented 2 months ago

They are now in #290. Taken from the PR:

# ------------------------------------------------------------------------------
# Test `fmt_datetime()`
# ------------------------------------------------------------------------------
@@ -1169,6 +1199,11 @@ def test_fmt_datetime():
            "x": [
                "2023-01-05 00:00:00",
                "2013-05-15 23:15",
                "2020-05-20",
                "2020-05-20 22:30",
                "2020-05-20T22:30",
                "2020-05-20 22:30:05",
                "2020-05-20T22:30:05.232",
            ]
        }
    )
@@ -1180,6 +1215,11 @@ def test_fmt_datetime():
    assert x == [
        "Thursday, January 5, 2023 at 12:00:00 AM",
        "Wednesday, May 15, 2013 at 11:15:00 PM",
        "Wednesday, May 20, 2020 at 12:00:00 AM",
        "Wednesday, May 20, 2020 at 10:30:00 PM",
        "Wednesday, May 20, 2020 at 10:30:00 PM",
        "Wednesday, May 20, 2020 at 10:30:05 PM",
        "Wednesday, May 20, 2020 at 10:30:05 PM",
    ]