Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

agriconnect / pandas   python

Repository URL to install this package:

Version: 0.24.2 

/ tests / tslibs / test_normalize_date.py

# -*- coding: utf-8 -*-
"""Tests for functions from pandas._libs.tslibs"""

from datetime import date, datetime

import pytest

from pandas._libs import tslibs


@pytest.mark.parametrize("value,expected", [
    (date(2012, 9, 7), datetime(2012, 9, 7)),
    (datetime(2012, 9, 7, 12), datetime(2012, 9, 7)),
    (datetime(2007, 10, 1, 1, 12, 5, 10), datetime(2007, 10, 1))
])
def test_normalize_date(value, expected):
    result = tslibs.normalize_date(value)
    assert result == expected