Exemplo n.º 1
0
    def test_display_include_index_a(self) -> None:

        f1 = Frame.from_element('b', index=range(3), columns=range(2))

        with self.assertRaises(RuntimeError):
            DisplayConfig(include_index=False, type_show=True)

        config1 = DisplayConfig(include_index=False, type_show=False)
        d1 = f1.display(config1)
        self.assertEqual(d1.to_rows(), ['0 1', 'b b', 'b b', 'b b'])

        config2 = DisplayConfig(include_index=False,
                                type_show=False,
                                include_columns=False)
        d2 = f1.display(config2)
        self.assertEqual(d2.to_rows(), ['b b', 'b b', 'b b'])
Exemplo n.º 2
0
 def test_display_tall(self) -> None:
     f = Frame.from_element(None, index=range(40), columns=range(20))
     self.assertEqual(len(f.display_tall().to_rows()), 44)
     self.assertEqual(len(f.display_wide().to_rows()), 39)