Skip to content

Commit 75c90e8

Browse files
authored
Remove xfails and workarounds for datetime inputs into pygmt.info (#1236)
* Remove xfails on pygmt.info tests with a time column Upstream bug resolved with GMT 6.2.0rc1 so the expected failure (xfail) decorators can be removed now. * Remove coltypes="0T" workaround since datetime inputs to pygmt.info is ok now
1 parent 0050eec commit 75c90e8

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

pygmt/tests/test_info.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,13 @@ def test_info_numpy_array_time_column():
5555
Make sure info works on a numpy.ndarray input with a datetime type.
5656
"""
5757
table = pd.date_range(start="2020-01-01", periods=5).to_numpy()
58-
# Please remove coltypes="0T" workaround after
59-
# https://github.com/GenericMappingTools/gmt/issues/4241 is resolved
60-
output = info(table=table, coltypes="0T")
58+
output = info(table=table)
6159
expected_output = (
6260
"<vector memory>: N = 5 <2020-01-01T00:00:00/2020-01-05T00:00:00>\n"
6361
)
6462
assert output == expected_output
6563

6664

67-
@pytest.mark.xfail(
68-
reason="UNIX timestamps returned instead of ISO datetime, should work on GMT 6.2.0 "
69-
"after https://github.com/GenericMappingTools/gmt/issues/4241 is resolved",
70-
)
7165
def test_info_pandas_dataframe_time_column():
7266
"""
7367
Make sure info works on pandas.DataFrame inputs with a time column.
@@ -85,10 +79,6 @@ def test_info_pandas_dataframe_time_column():
8579
assert output == expected_output
8680

8781

88-
@pytest.mark.xfail(
89-
reason="UNIX timestamp returned instead of ISO datetime, should work on GMT 6.2.0 "
90-
"after https://github.com/GenericMappingTools/gmt/issues/4241 is resolved",
91-
)
9282
def test_info_xarray_dataset_time_column():
9383
"""
9484
Make sure info works on xarray.Dataset 1D inputs with a time column.
@@ -143,9 +133,7 @@ def test_info_per_column_with_time_inputs():
143133
Make sure the per_column option works with time inputs.
144134
"""
145135
table = pd.date_range(start="2020-01-01", periods=5).to_numpy()
146-
# Please remove coltypes="0T" workaround after
147-
# https://github.com/GenericMappingTools/gmt/issues/4241 is resolved
148-
output = info(table=table, per_column=True, coltypes="0T")
136+
output = info(table=table, per_column=True)
149137
npt.assert_equal(
150138
actual=output, desired=["2020-01-01T00:00:00", "2020-01-05T00:00:00"]
151139
)

0 commit comments

Comments
 (0)