# Path: rows/fields.py
# @property
# def fields(self):
#     possible, skip = self._possible_types, self._skip
# 
#     if possible:
#         # Create a header with placeholder values for each detected column
#         # and then join this placeholders with original header - the
#         # original header may have less columns then the detected ones, so
#         # we end with a full header having a name for every possible
#         # column.
#         placeholders = make_header(range(max(possible.keys()) + 1))
#         header = [a or b for a, b in zip_longest(self.field_names, placeholders)]
#     else:
#         header = self.field_names
# 
#     return OrderedDict(
#         [
#             (
#                 field_name,
#                 self.define_field_type(
#                     is_empty=self._is_empty[index],
#                     possible_types=possible[index] if index in possible else [],
#                 ),
#             )
#             for index, field_name in enumerate(header)
#             if index not in skip
#         ]
#     )


import datetime
import json
import platform
import unittest
import uuid
import six
import rows
from base64 import b64encode
from decimal import Decimal
from rows import fields
            type(fields.IntegerField.deserialize("42")), fields.IntegerField.TYPE
        )
        self.assertEqual(fields.IntegerField.deserialize("42"), 42)
        self.assertEqual(fields.IntegerField.deserialize(42), 42)
        self.assertEqual(fields.IntegerField.serialize(42), "42")
        self.assertIs(type(fields.IntegerField.serialize(42)), six.text_type)
        self.assertEqual(fields.IntegerField.deserialize(None), None)
        self.assertEqual(
            fields.IntegerField.deserialize("10152709355006317"), 10152709355006317
        )

        with rows.locale_context(locale_name):
            self.assertEqual(fields.IntegerField.serialize(42000), "42000")
            self.assertIs(type(fields.IntegerField.serialize(42000)), six.text_type)
            self.assertEqual(
                fields.IntegerField.serialize(42000, grouping=True), "42.000"
            )
            self.assertEqual(fields.IntegerField.deserialize("42.000"), 42000)
            self.assertEqual(fields.IntegerField.deserialize(42), 42)
            self.assertEqual(fields.IntegerField.deserialize(42.0), 42)

        with self.assertRaises(ValueError):
            fields.IntegerField.deserialize(1.23)

        with self.assertRaises(ValueError):
            fields.IntegerField.deserialize("013")

        self.assertEqual(fields.IntegerField.deserialize("0"), 0)

    def test_FloatField(self):

# Path: rows/fields.py
# @property
# def fields(self):
#     possible, skip = self._possible_types, self._skip
# 
#     if possible:
#         # Create a header with placeholder values for each detected column
#         # and then join this placeholders with original header - the
#         # original header may have less columns then the detected ones, so
#         # we end with a full header having a name for every possible
#         # column.
#         placeholders = make_header(range(max(possible.keys()) + 1))
#         header = [a or b for a, b in zip_longest(self.field_names, placeholders)]
#     else:
#         header = self.field_names
# 
#     return OrderedDict(
#         [
#             (
#                 field_name,
#                 self.define_field_type(
#                     is_empty=self._is_empty[index],
#                     possible_types=possible[index] if index in possible else [],
#                 ),
#             )
#             for index, field_name in enumerate(header)
#             if index not in skip
#         ]
#     )


# Path: tests/tests_fields.py
import datetime
import json
import platform
import unittest
import uuid
import six
import rows
from base64 import b64encode
from decimal import Decimal
from rows import fields

            type(fields.IntegerField.deserialize("42")), fields.IntegerField.TYPE
        )
        self.assertEqual(fields.IntegerField.deserialize("42"), 42)
        self.assertEqual(fields.IntegerField.deserialize(42), 42)
        self.assertEqual(fields.IntegerField.serialize(42), "42")
        self.assertIs(type(fields.IntegerField.serialize(42)), six.text_type)
        self.assertEqual(fields.IntegerField.deserialize(None), None)
        self.assertEqual(
            fields.IntegerField.deserialize("10152709355006317"), 10152709355006317
        )

        with rows.locale_context(locale_name):
            self.assertEqual(fields.IntegerField.serialize(42000), "42000")
            self.assertIs(type(fields.IntegerField.serialize(42000)), six.text_type)
            self.assertEqual(
                fields.IntegerField.serialize(42000, grouping=True), "42.000"
            )
            self.assertEqual(fields.IntegerField.deserialize("42.000"), 42000)
            self.assertEqual(fields.IntegerField.deserialize(42), 42)
            self.assertEqual(fields.IntegerField.deserialize(42.0), 42)

        with self.assertRaises(ValueError):
            fields.IntegerField.deserialize(1.23)

        with self.assertRaises(ValueError):
            fields.IntegerField.deserialize("013")

        self.assertEqual(fields.IntegerField.deserialize("0"), 0)

    def test_FloatField(self):

        self.assertEqual(fields.FloatField.TYPE, (float,))