# 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,
# ]


import pytest
from marshmallow import (
    fields,
    Schema,
    ValidationError,
    EXCLUDE,
    INCLUDE,
    RAISE,
    missing,
)
from marshmallow.exceptions import StringNotCollectionError
from tests.base import ALL_FIELDS
        assert schema2.fields["foo"].value_field.root == schema2

    # Regression test for https://github.com/marshmallow-code/marshmallow/issues/1357
    def test_datetime_list_inner_format(self, schema):
        class MySchema(Schema):
            foo = fields.List(fields.DateTime())
            bar = fields.Tuple((fields.DateTime(),))
            baz = fields.List(fields.Date())
            qux = fields.Tuple((fields.Date(),))

            class Meta:
                datetimeformat = "iso8601"
                dateformat = "iso8601"

        schema = MySchema()
        for field_name in ("foo", "baz"):
            assert schema.fields[field_name].inner.format == "iso8601"
        for field_name in ("bar", "qux"):
            assert schema.fields[field_name].tuple_fields[0].format == "iso8601"

    # Regression test for https://github.com/marshmallow-code/marshmallow/issues/1808
    def test_field_named_parent_has_root(self, schema):
        class MySchema(Schema):
            parent = fields.Field()

        schema = MySchema()
        assert schema.fields["parent"].root == schema


class TestMetadata:

# 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,
# ]


# Path: tests/test_fields.py
import pytest
from marshmallow import (
    fields,
    Schema,
    ValidationError,
    EXCLUDE,
    INCLUDE,
    RAISE,
    missing,
)
from marshmallow.exceptions import StringNotCollectionError
from tests.base import ALL_FIELDS

        assert schema2.fields["foo"].value_field.root == schema2

    # Regression test for https://github.com/marshmallow-code/marshmallow/issues/1357
    def test_datetime_list_inner_format(self, schema):
        class MySchema(Schema):
            foo = fields.List(fields.DateTime())
            bar = fields.Tuple((fields.DateTime(),))
            baz = fields.List(fields.Date())
            qux = fields.Tuple((fields.Date(),))

            class Meta:
                datetimeformat = "iso8601"
                dateformat = "iso8601"

        schema = MySchema()
        for field_name in ("foo", "baz"):
            assert schema.fields[field_name].inner.format == "iso8601"
        for field_name in ("bar", "qux"):
            assert schema.fields[field_name].tuple_fields[0].format == "iso8601"

    # Regression test for https://github.com/marshmallow-code/marshmallow/issues/1808
    def test_field_named_parent_has_root(self, schema):
        class MySchema(Schema):
            parent = fields.Field()

        schema = MySchema()
        assert schema.fields["parent"].root == schema


class TestMetadata:

    @pytest.mark.parametrize("FieldClass", ALL_FIELDS)