def test_full_table_string_edge_case(self): table = LongIntTable({0:1}) self.assertEqual(ti.full_table_string(table), '0: 1\n')
def test_full_table_string_right_justifies_all_values_also_no_zeroes(self): table = LongIntTable({1:10, 10:200, 1000:3000}) self.assertEqual(ti.full_table_string(table, zeroes=False), ' 1: 10\n 10: 200\n1000: 3,000\n')
def test_full_table_string_includes_zeroes_as_requested(self): table = LongIntTable({1:1, 3:1}) self.assertEqual(ti.full_table_string(table, zeroes=True), '1: 1\n2: 0.0\n3: 1\n')
def test_full_table_string_returns_empty_str_for_empty_table(self): self.assertEqual(ti.full_table_string(LongIntTable({})), '')