def test_parseTable_singleColumn(self):

        text = "field\nstr"

        expected = "| field |\n|-------|\n| str   |"
        actual = gfm_utils.parse_table(text)

        self.assertEqual(actual, expected)
    def test_parseTable_onlyTitles(self):

        text = "name, value, default"

        expected = "| name | value | default |\n|------|-------|---------|"
        actual = gfm_utils.parse_table(text)

        self.assertEqual(actual, expected)
    def test_parseTable(self):

        text = "name, value, default\nstr, testing, test"

        expected = "| name | value   | default |\n|------|---------|---------|\n| str  | testing | test    |"
        actual = gfm_utils.parse_table(text)

        self.assertEqual(actual, expected)
    def test_parseTable_borderless(self):

        text = "name, value, default\nstr, testing, test"
        bordered = False

        expected = "name | value   | default\n-----|---------|--------\nstr  | testing | test   "
        actual = gfm_utils.parse_table(text, bordered=bordered)

        self.assertEqual(actual, expected)
    def test_parseTable_withDelimiter(self):

        text = "name; value; default\nstr; testing; test"
        delimiter = ";"

        expected = "| name | value   | default |\n|------|---------|---------|\n| str  | testing | test    |"
        actual = gfm_utils.parse_table(text, delimiter)

        self.assertEqual(actual, expected)
    def test_parseTable_bordered_notBoolean(self):

        with self.assertRaises(AssertionError):
            gfm_utils.parse_table("text", bordered="abc")
    def test_parseTable_delimiter_blank(self):

        with self.assertRaises(AssertionError):
            gfm_utils.parse_table("text", " ")
    def test_parseTable_text_none(self):

        with self.assertRaises(AssertionError):
            gfm_utils.parse_table(None)