From f5376994d041037fd0904bea23b0c6f4dbb8b29f Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 6 Nov 2024 10:31:51 +0800 Subject: [PATCH] Test timedelta64 dtype arrays with various date/time units (#3567) --- pygmt/tests/test_clib_put_vector.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pygmt/tests/test_clib_put_vector.py b/pygmt/tests/test_clib_put_vector.py index 46b199727f0..968e09bf87c 100644 --- a/pygmt/tests/test_clib_put_vector.py +++ b/pygmt/tests/test_clib_put_vector.py @@ -172,10 +172,12 @@ def test_put_vector_string_dtype(): def test_put_vector_timedelta64_dtype(): """ - Passing timedelta64 type vectors with various time units (year, month, - week, day, hour, minute, second, millisecond, microsecond) to a dataset. + Passing timedelta64 type vectors with various date/time units to a dataset. + + Valid date/time units can be found at + https://numpy.org/devdocs/reference/arrays.datetime.html#datetime-units. """ - for unit in ["Y", "M", "W", "D", "h", "m", "s", "ms", "μs"]: + for unit in ["Y", "M", "W", "D", "h", "m", "s", "ms", "us", "ns", "ps", "fs", "as"]: with clib.Session() as lib, GMTTempFile() as tmp_file: dataset = lib.create_data( family="GMT_IS_DATASET|GMT_VIA_VECTOR",