# Path: cliff/formatters/table.py
# def _format_row(row):
#     def add_argument_group(self, parser):
#     def add_rows(self, table, column_names, data):
#     def emit_list(self, column_names, data, stdout, parsed_args):
#     def emit_one(self, column_names, data, stdout, parsed_args):
#     def _field_widths(field_names, first_line):
#     def _width_info(term_width, field_count):
#     def _build_shrink_fields(usable_total_width, optimal_width,
#                              field_widths, field_names):
#     def _assign_max_widths(stdout, x, max_width, min_width=0, fit_width=False):
# class TableFormatter(base.ListFormatter, base.SingleFormatter):
#     ALIGNMENTS = {
#         int: 'r',
#         str: 'l',
#         float: 'r',
#     }
# 
# Path: cliff/tests/test_columns.py
# class FauxColumn(columns.FormattableColumn):
# class TestColumns(unittest.TestCase):
#     def human_readable(self):
#     def test_faux_column_machine(self):
#     def test_faux_column_human(self):
#     def test_sorting(self):


import argparse
import os
import textwrap
from io import StringIO
from unittest import mock
from cliff.formatters import table
from cliff.tests import base
from cliff.tests import test_columns
class TestFieldWidths(base.TestBase):

    def test(self):
        tf = table.TableFormatter
        self.assertEqual(
            {
                'a': 1,
                'b': 2,
                'c': 3,
                'd': 10
            },
            tf._field_widths(
                ('a', 'b', 'c', 'd'),
                '+---+----+-----+------------+'),
        )

    def test_zero(self):
        tf = table.TableFormatter
        self.assertEqual(
            {
                'a': 0,
                'b': 0,
                'c': 0
            },
            tf._field_widths(
                ('a', 'b', 'c'),
                '+--+-++'),
        )

    def test_info(self):

# Path: cliff/formatters/table.py
# def _format_row(row):
#     def add_argument_group(self, parser):
#     def add_rows(self, table, column_names, data):
#     def emit_list(self, column_names, data, stdout, parsed_args):
#     def emit_one(self, column_names, data, stdout, parsed_args):
#     def _field_widths(field_names, first_line):
#     def _width_info(term_width, field_count):
#     def _build_shrink_fields(usable_total_width, optimal_width,
#                              field_widths, field_names):
#     def _assign_max_widths(stdout, x, max_width, min_width=0, fit_width=False):
# class TableFormatter(base.ListFormatter, base.SingleFormatter):
#     ALIGNMENTS = {
#         int: 'r',
#         str: 'l',
#         float: 'r',
#     }
# 
# Path: cliff/tests/test_columns.py
# class FauxColumn(columns.FormattableColumn):
# class TestColumns(unittest.TestCase):
#     def human_readable(self):
#     def test_faux_column_machine(self):
#     def test_faux_column_human(self):
#     def test_sorting(self):


# Path: cliff/tests/test_formatters_table.py
import argparse
import os
import textwrap
from io import StringIO
from unittest import mock
from cliff.formatters import table
from cliff.tests import base
from cliff.tests import test_columns

class TestFieldWidths(base.TestBase):

    def test(self):
        tf = table.TableFormatter
        self.assertEqual(
            {
                'a': 1,
                'b': 2,
                'c': 3,
                'd': 10
            },
            tf._field_widths(
                ('a', 'b', 'c', 'd'),
                '+---+----+-----+------------+'),
        )

    def test_zero(self):
        tf = table.TableFormatter
        self.assertEqual(
            {
                'a': 0,
                'b': 0,
                'c': 0
            },
            tf._field_widths(
                ('a', 'b', 'c'),
                '+--+-++'),
        )

    def test_info(self):

        tf = table.TableFormatter