diff options
| author | Tom Christie <tom@tomchristie.com> | 2016-02-25 13:28:29 +0000 |
|---|---|---|
| committer | Tom Christie <tom@tomchristie.com> | 2016-02-25 13:28:29 +0000 |
| commit | d720beadac14ae051a424f1ad1add17cf7b6d240 (patch) | |
| tree | 6378d8b3b72a5945daea38fdb70f7ba3c0754e3d /test_tablib.py | |
| parent | ee9666a146514573a2a159baaabb0481a7e2c5c0 (diff) | |
| download | tablib-d720beadac14ae051a424f1ad1add17cf7b6d240.tar.gz | |
Fixed __unicode__/__str__ for dataset with no headers
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test_tablib.py b/test_tablib.py index 63ddf93..30bbacf 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -351,6 +351,16 @@ class TablibTestCase(unittest.TestCase): self.assertFalse('^' in output) self.assertTrue('textasciicircum' in output) + def test_str_no_columns(self): + d = tablib.Dataset(['a', 1], ['b', 2], ['c', 3]) + output = '%s' % d + + self.assertEqual(output.splitlines(), [ + 'a|1', + 'b|2', + 'c|3' + ]) + def test_unicode_append(self): """Passes in a single unicode character and exports.""" |
