diff options
| author | Alexander Artemenko <svetlyak.40wt@gmail.com> | 2011-10-16 11:00:06 +0400 |
|---|---|---|
| committer | Alexander Artemenko <svetlyak.40wt@gmail.com> | 2011-10-16 11:00:06 +0400 |
| commit | 23ab6c4724cded5dac64c164773b76794ec3b00e (patch) | |
| tree | 33fe47a9498b6601fb1d84ca6f103a6423f91077 /test_tablib.py | |
| parent | 32a09ccd6ac26a3cbf4d632871ef383787acbb80 (diff) | |
| download | tablib-23ab6c4724cded5dac64c164773b76794ec3b00e.tar.gz | |
Render table in Markdown format on unicode(dataset). Closes #41.
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test_tablib.py b/test_tablib.py index 5455c28..0bfb417 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -649,6 +649,22 @@ class TablibTestCase(unittest.TestCase): self.assertEquals(self.founders[orig_target_header], data[target_header]) + def test_unicode_renders_markdown_table(self): + # add another entry to test right field width for + # integer + self.founders.append(('Old', 'Man', 100500)) + + self.assertEquals( + u""" +first_name|last_name |gpa +----------|----------|------ +John |Adams |90 +George |Washington|67 +Thomas |Jefferson |50 +Old |Man |100500 +""".strip(), + unicode(self.founders) + ) if __name__ == '__main__': |
