diff options
author | wolfhong <hongxucai1991@gmail.com> | 2018-07-30 15:51:00 +0800 |
---|---|---|
committer | wolfhong <hongxucai1991@gmail.com> | 2018-07-30 15:51:00 +0800 |
commit | 1c78b292c8581d1d4ebf8d2b59f114dbde77c705 (patch) | |
tree | 1c44dcc7adf6b29138eab32088715035f3af7b98 | |
parent | 34b0deead2bbff15c0da730e05564d055fe8590e (diff) | |
download | python-prettytable-ptable-1c78b292c8581d1d4ebf8d2b59f114dbde77c705.tar.gz |
rename get_markdown to get_md_string; rename get_rst to get_rst_string;
-rw-r--r-- | prettytable/prettytable.py | 4 | ||||
-rw-r--r-- | tests/test_prettytable.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/prettytable/prettytable.py b/prettytable/prettytable.py index 86f4e6d..96b94bf 100644 --- a/prettytable/prettytable.py +++ b/prettytable/prettytable.py @@ -1400,7 +1400,7 @@ class PrettyTable(object): # MARKDOWN TEXT STRING METHODS # ################################ - def get_markdown(self, **kwargs): + def get_md_string(self, **kwargs): """Return string representation of table in markdown. @@ -1424,7 +1424,7 @@ class PrettyTable(object): lines = self._prepare_lines(**kwargs) return self._unicode("\n").join(lines) - def get_rst(self, **kwargs): + def get_rst_string(self, **kwargs): """Return string representation of table in reStructuredText. diff --git a/tests/test_prettytable.py b/tests/test_prettytable.py index 235cd81..064e2b0 100644 --- a/tests/test_prettytable.py +++ b/tests/test_prettytable.py @@ -734,7 +734,7 @@ class PrintMarkdownAndRstTest(unittest.TestCase): self.x.add_row(["aa", "bb", "cc"]) def testMarkdownOutput(self): - result = self.x.get_markdown() + result = self.x.get_md_string() print() print(result) self.assertEqual(result.strip(), """ @@ -745,7 +745,7 @@ class PrintMarkdownAndRstTest(unittest.TestCase): """.strip()) def testRstOutput(self): - result = self.x.get_rst() + result = self.x.get_rst_string() print() print(result) self.assertEqual(result.strip(), """ |