SEPURI-SAI-KRISHNA commented on code in PR #45410:
URL: https://github.com/apache/superset/pull/45410#discussion_r4321234329
##########
tests/unit_tests/charts/test_client_processing.py:
##########
@@ -2488,6 +2488,60 @@ def test_table_applies_currency_format() -> None:
assert formatted["amount"].tolist() == ["$ 1,234.50"]
+def test_table_applies_time_format_alongside_number_format() -> None:
Review Comment:
Fair, the guard was unpinned. Added `test_table_time_format_keeps_nulls`:
```python
df = pd.DataFrame.from_dict(
{"ds": {0: pd.Timestamp("2024-01-15"), 1: pd.NaT}},
)
...
assert formatted["ds"].tolist()[0] == "2024"
assert pd.isna(formatted["ds"].tolist()[1])
```
Dropping the `pd.notna` check makes it fail on the second cell with the
string `NaT`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]