88from dateutil .parser import parse
99
1010import pandas .util ._test_decorators as td
11- from pandas .conftest import is_dateutil_le_261 , is_dateutil_gt_261
1211from pandas import compat
1312from pandas .util import testing as tm
1413from pandas ._libs .tslibs import parsing
@@ -96,7 +95,6 @@ def test_parsers_monthfreq(self):
9695class TestGuessDatetimeFormat (object ):
9796
9897 @td .skip_if_not_us_locale
99- @is_dateutil_le_261
10098 @pytest .mark .parametrize (
10199 "string, format" ,
102100 [
@@ -112,19 +110,6 @@ def test_guess_datetime_format_with_parseable_formats(
112110 result = parsing ._guess_datetime_format (string )
113111 assert result == format
114112
115- @td .skip_if_not_us_locale
116- @is_dateutil_gt_261
117- @pytest .mark .parametrize (
118- "string" ,
119- ['20111230' , '2011-12-30' , '30-12-2011' ,
120- '2011-12-30 00:00:00' , '2011-12-30T00:00:00' ,
121- '2011-12-30 00:00:00.000000' ])
122- def test_guess_datetime_format_with_parseable_formats_gt_261 (
123- self , string ):
124- result = parsing ._guess_datetime_format (string )
125- assert result is None
126-
127- @is_dateutil_le_261
128113 @pytest .mark .parametrize (
129114 "dayfirst, expected" ,
130115 [
@@ -136,17 +121,7 @@ def test_guess_datetime_format_with_dayfirst(self, dayfirst, expected):
136121 ambiguous_string , dayfirst = dayfirst )
137122 assert result == expected
138123
139- @is_dateutil_gt_261
140- @pytest .mark .parametrize (
141- "dayfirst" , [True , False ])
142- def test_guess_datetime_format_with_dayfirst_gt_261 (self , dayfirst ):
143- ambiguous_string = '01/01/2011'
144- result = parsing ._guess_datetime_format (
145- ambiguous_string , dayfirst = dayfirst )
146- assert result is None
147-
148124 @td .skip_if_has_locale
149- @is_dateutil_le_261
150125 @pytest .mark .parametrize (
151126 "string, format" ,
152127 [
@@ -158,19 +133,6 @@ def test_guess_datetime_format_with_locale_specific_formats(
158133 result = parsing ._guess_datetime_format (string )
159134 assert result == format
160135
161- @td .skip_if_has_locale
162- @is_dateutil_gt_261
163- @pytest .mark .parametrize (
164- "string" ,
165- [
166- '30/Dec/2011' ,
167- '30/December/2011' ,
168- '30/Dec/2011 00:00:00' ])
169- def test_guess_datetime_format_with_locale_specific_formats_gt_261 (
170- self , string ):
171- result = parsing ._guess_datetime_format (string )
172- assert result is None
173-
174136 def test_guess_datetime_format_invalid_inputs (self ):
175137 # A datetime string must include a year, month and a day for it
176138 # to be guessable, in addition to being a string that looks like
@@ -189,7 +151,6 @@ def test_guess_datetime_format_invalid_inputs(self):
189151 for invalid_dt in invalid_dts :
190152 assert parsing ._guess_datetime_format (invalid_dt ) is None
191153
192- @is_dateutil_le_261
193154 @pytest .mark .parametrize (
194155 "string, format" ,
195156 [
@@ -204,21 +165,6 @@ def test_guess_datetime_format_nopadding(self, string, format):
204165 result = parsing ._guess_datetime_format (string )
205166 assert result == format
206167
207- @is_dateutil_gt_261
208- @pytest .mark .parametrize (
209- "string" ,
210- [
211- '2011-1-1' ,
212- '30-1-2011' ,
213- '1/1/2011' ,
214- '2011-1-1 00:00:00' ,
215- '2011-1-1 0:0:0' ,
216- '2011-1-3T00:00:0' ])
217- def test_guess_datetime_format_nopadding_gt_261 (self , string ):
218- # GH 11142
219- result = parsing ._guess_datetime_format (string )
220- assert result is None
221-
222168
223169class TestArrayToDatetime (object ):
224170 def test_try_parse_dates (self ):
0 commit comments