MCPcopy Create free account
hub / github.com/dateutil/dateutil / __make_date_examples

Function __make_date_examples

tests/test_isoparser.py:354–375  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

352###
353# Test parse_isodate
354def __make_date_examples():
355 dates_no_day = [
356 date(1999, 12, 1),
357 date(2016, 2, 1)
358 ]
359
360 dates_no_day.append(date(1000, 11, 1))
361
362 # Only one supported format for dates with no day
363 o = zip(dates_no_day, it.repeat('%Y-%m'))
364
365 dates_w_day = [
366 date(1969, 12, 31),
367 date(1900, 1, 1),
368 date(2016, 2, 29),
369 date(2017, 11, 14)
370 ]
371
372 dates_w_day_fmts = ('%Y%m%d', '%Y-%m-%d')
373 o = it.chain(o, it.product(dates_w_day, dates_w_day_fmts))
374
375 return list(o)
376
377
378@pytest.mark.parametrize('d,dt_fmt', __make_date_examples())

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected