# 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
        | a | b | c             |
        +---+---+---------------+
        | A | B | C             |
        | D | E | test carriage |
        |   |   | return        |
        +---+---+---------------+
        ''')
        self.assertEqual(expected, _table_tester_helper(c, data))

    @mock.patch('cliff.utils.terminal_width')
    def test_table_formatter_formattable_column(self, tw):
        tw.return_value = 0
        c = ('a', 'b', 'c', 'd')
        d = ('A', 'B', 'C', test_columns.FauxColumn(['the', 'value']))
        expected = textwrap.dedent('''\
        +-------+---------------------------------------------+
        | Field | Value                                       |
        +-------+---------------------------------------------+
        | a     | A                                           |
        | b     | B                                           |
        | c     | C                                           |
        | d     | I made this string myself: ['the', 'value'] |
        +-------+---------------------------------------------+
        ''')
        self.assertEqual(expected, _table_tester_helper(c, d))

    @mock.patch('cliff.utils.terminal_width')
    def test_formattable_column(self, tw):
        tw.return_value = 80
        c = ('a', 'b', 'c')

# 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

        | a | b | c             |
        +---+---+---------------+
        | A | B | C             |
        | D | E | test carriage |
        |   |   | return        |
        +---+---+---------------+
        ''')
        self.assertEqual(expected, _table_tester_helper(c, data))

    @mock.patch('cliff.utils.terminal_width')
    def test_table_formatter_formattable_column(self, tw):
        tw.return_value = 0
        c = ('a', 'b', 'c', 'd')
        d = ('A', 'B', 'C', test_columns.FauxColumn(['the', 'value']))
        expected = textwrap.dedent('''\
        +-------+---------------------------------------------+
        | Field | Value                                       |
        +-------+---------------------------------------------+
        | a     | A                                           |
        | b     | B                                           |
        | c     | C                                           |
        | d     | I made this string myself: ['the', 'value'] |
        +-------+---------------------------------------------+
        ''')
        self.assertEqual(expected, _table_tester_helper(c, d))

    @mock.patch('cliff.utils.terminal_width')
    def test_formattable_column(self, tw):
        tw.return_value = 80
        c = ('a', 'b', 'c')

        d1 = ('A', 'B', test_columns.FauxColumn(['the', 'value']))