# Path: tests/base.py
# ALL_FIELDS = [
#     fields.String,
#     fields.Integer,
#     fields.Boolean,
#     fields.Float,
#     fields.Number,
#     fields.DateTime,
#     fields.Time,
#     fields.Date,
#     fields.TimeDelta,
#     fields.Dict,
#     fields.Url,
#     fields.Email,
#     fields.UUID,
#     fields.Decimal,
#     fields.IP,
#     fields.IPv4,
#     fields.IPv6,
#     fields.IPInterface,
#     fields.IPv4Interface,
#     fields.IPv6Interface,
# ]
#     SPECIES = "Homo sapiens"
# def assert_date_equal(d1, d2):
# def assert_time_equal(t1, t2):
#     def __init__(
#         self,
#         name,
#         age=0,
#         id_=None,
#         homepage=None,
#         email=None,
#         registered=True,
#         time_registered=None,
#         birthdate=None,
#         birthtime=None,
#         balance=100,
#         sex="male",
#         employer=None,
#         various_data=None,
#     ):
#     def since_created(self):
#     def __repr__(self):
#     def __init__(self, title, user, collaborators=None, categories=None, id_=None):
#     def __contains__(self, item):
#     def __init__(self, foo):
#     def __eq__(self, other):
#     def __str__(self):
#     def _serialize(self, value, attr, obj):
# def get_lowername(obj):
#     def get_is_old(self, obj):
#     def make_user(self, data, **kwargs):
#     def get_is_old(self, obj):
#     def dumps(val):
#     def loads(val):
# class User:
# class Blog:
# class DummyModel:
# class Uppercased(fields.Field):
# class UserSchema(Schema):
#     class Meta:
# class UserMetaSchema(Schema):
#     class Meta:
# class UserExcludeSchema(UserSchema):
#     class Meta:
# class UserAdditionalSchema(Schema):
#     class Meta:
# class UserIntSchema(UserSchema):
# class UserFloatStringSchema(UserSchema):
# class ExtendedUserSchema(UserSchema):
# class UserRelativeUrlSchema(UserSchema):
# class BlogSchema(Schema):
# class BlogUserMetaSchema(Schema):
# class BlogSchemaMeta(Schema):
#     class Meta:
# class BlogOnlySchema(Schema):
# class BlogSchemaExclude(BlogSchema):
# class BlogSchemaOnlyExclude(BlogSchema):
# class mockjson:  # noqa


import datetime as dt
import pytest
from collections import namedtuple
from functools import partial
from copy import copy, deepcopy
from marshmallow import utils, fields, Schema
from tests.base import central, assert_time_equal, assert_date_equal
        ),
        (
            "2013-11-10T01:23:45.123456+00:00",
            dt.datetime(2013, 11, 10, 1, 23, 45, 123456, tzinfo=dt.timezone.utc),
        ),
        (
            "2013-11-10T01:23:45-06:00",
            central.localize(dt.datetime(2013, 11, 10, 1, 23, 45), is_dst=False),
        ),
    ],
)
def test_from_iso_datetime(value, expected):
    result = utils.from_iso_datetime(value)
    assert type(result) == dt.datetime
    assert result == expected


def test_from_iso_time_with_microseconds():
    t = dt.time(1, 23, 45, 6789)
    formatted = t.isoformat()
    result = utils.from_iso_time(formatted)
    assert type(result) == dt.time
    assert_time_equal(result, t)


def test_from_iso_time_without_microseconds():
    t = dt.time(1, 23, 45)
    formatted = t.isoformat()
    result = utils.from_iso_time(formatted)
    assert type(result) == dt.time

# Path: tests/base.py
# ALL_FIELDS = [
#     fields.String,
#     fields.Integer,
#     fields.Boolean,
#     fields.Float,
#     fields.Number,
#     fields.DateTime,
#     fields.Time,
#     fields.Date,
#     fields.TimeDelta,
#     fields.Dict,
#     fields.Url,
#     fields.Email,
#     fields.UUID,
#     fields.Decimal,
#     fields.IP,
#     fields.IPv4,
#     fields.IPv6,
#     fields.IPInterface,
#     fields.IPv4Interface,
#     fields.IPv6Interface,
# ]
#     SPECIES = "Homo sapiens"
# def assert_date_equal(d1, d2):
# def assert_time_equal(t1, t2):
#     def __init__(
#         self,
#         name,
#         age=0,
#         id_=None,
#         homepage=None,
#         email=None,
#         registered=True,
#         time_registered=None,
#         birthdate=None,
#         birthtime=None,
#         balance=100,
#         sex="male",
#         employer=None,
#         various_data=None,
#     ):
#     def since_created(self):
#     def __repr__(self):
#     def __init__(self, title, user, collaborators=None, categories=None, id_=None):
#     def __contains__(self, item):
#     def __init__(self, foo):
#     def __eq__(self, other):
#     def __str__(self):
#     def _serialize(self, value, attr, obj):
# def get_lowername(obj):
#     def get_is_old(self, obj):
#     def make_user(self, data, **kwargs):
#     def get_is_old(self, obj):
#     def dumps(val):
#     def loads(val):
# class User:
# class Blog:
# class DummyModel:
# class Uppercased(fields.Field):
# class UserSchema(Schema):
#     class Meta:
# class UserMetaSchema(Schema):
#     class Meta:
# class UserExcludeSchema(UserSchema):
#     class Meta:
# class UserAdditionalSchema(Schema):
#     class Meta:
# class UserIntSchema(UserSchema):
# class UserFloatStringSchema(UserSchema):
# class ExtendedUserSchema(UserSchema):
# class UserRelativeUrlSchema(UserSchema):
# class BlogSchema(Schema):
# class BlogUserMetaSchema(Schema):
# class BlogSchemaMeta(Schema):
#     class Meta:
# class BlogOnlySchema(Schema):
# class BlogSchemaExclude(BlogSchema):
# class BlogSchemaOnlyExclude(BlogSchema):
# class mockjson:  # noqa


# Path: tests/test_utils.py
import datetime as dt
import pytest
from collections import namedtuple
from functools import partial
from copy import copy, deepcopy
from marshmallow import utils, fields, Schema
from tests.base import central, assert_time_equal, assert_date_equal

        ),
        (
            "2013-11-10T01:23:45.123456+00:00",
            dt.datetime(2013, 11, 10, 1, 23, 45, 123456, tzinfo=dt.timezone.utc),
        ),
        (
            "2013-11-10T01:23:45-06:00",
            central.localize(dt.datetime(2013, 11, 10, 1, 23, 45), is_dst=False),
        ),
    ],
)
def test_from_iso_datetime(value, expected):
    result = utils.from_iso_datetime(value)
    assert type(result) == dt.datetime
    assert result == expected


def test_from_iso_time_with_microseconds():
    t = dt.time(1, 23, 45, 6789)
    formatted = t.isoformat()
    result = utils.from_iso_time(formatted)
    assert type(result) == dt.time
    assert_time_equal(result, t)


def test_from_iso_time_without_microseconds():
    t = dt.time(1, 23, 45)
    formatted = t.isoformat()
    result = utils.from_iso_time(formatted)
    assert type(result) == dt.time

    assert_time_equal(result, t)