summaryrefslogtreecommitdiff
path: root/test_tablib.py
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2011-03-23 00:50:27 -0400
committerKenneth Reitz <me@kennethreitz.com>2011-03-23 00:50:27 -0400
commitb9002361577e5b64c74d3e5734cc6b10e5682aeb (patch)
tree0021aff6cc74508863515b22cd612bfb75b353f6 /test_tablib.py
parentdc14a16e04a526b8c2f5a978d8b094760aca05ed (diff)
downloadtablib-b9002361577e5b64c74d3e5734cc6b10e5682aeb.tar.gz
testing whitespace cleanup
Diffstat (limited to 'test_tablib.py')
-rwxr-xr-xtest_tablib.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/test_tablib.py b/test_tablib.py
index 4e49c50..568d3d8 100755
--- a/test_tablib.py
+++ b/test_tablib.py
@@ -295,6 +295,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(_csv, data.csv)
+
def test_csv_import_set_with_spaces(self):
"""Generate and import CSV set serialization when row values have
spaces."""
@@ -308,6 +309,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(_csv, data.csv)
+
def test_tsv_import_set(self):
"""Generate and import TSV set serialization."""
data.append(self.john)
@@ -320,6 +322,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(_tsv, data.tsv)
+
def test_csv_format_detect(self):
"""Test CSV format detection."""
@@ -335,6 +338,7 @@ class TablibTestCase(unittest.TestCase):
self.assertTrue(tablib.formats.csv.detect(_csv))
self.assertFalse(tablib.formats.csv.detect(_bunk))
+
def test_tsv_format_detect(self):
"""Test TSV format detection."""
@@ -350,6 +354,7 @@ class TablibTestCase(unittest.TestCase):
self.assertTrue(tablib.formats.tsv.detect(_tsv))
self.assertFalse(tablib.formats.tsv.detect(_bunk))
+
def test_json_format_detect(self):
"""Test JSON format detection."""
@@ -387,6 +392,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(tablib.detect(_json)[0], tablib.formats.json)
self.assertEqual(tablib.detect(_bunk)[0], None)
+
def test_transpose(self):
"""Transpose a dataset."""
@@ -401,6 +407,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(second_row,
("gpa",90, 67, 50))
+
def test_row_stacking(self):
"""Row stacking."""
@@ -418,6 +425,7 @@ class TablibTestCase(unittest.TestCase):
expected_data = original_data + original_data
self.assertEqual(row_stacked[column], expected_data)
+
def test_column_stacking(self):
"""Column stacking"""
@@ -438,6 +446,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(column_stacked[0],
("John", "Adams", 90, "John", "Adams", 90))
+
def test_sorting(self):
"""Sort columns."""
@@ -455,6 +464,7 @@ class TablibTestCase(unittest.TestCase):
self.assertEqual(second_row, expected_second)
self.assertEqual(third_row, expected_third)
+
def test_wipe(self):
"""Purge a dataset."""
@@ -470,7 +480,8 @@ class TablibTestCase(unittest.TestCase):
data.append(new_row)
self.assertTrue(data.width == len(new_row))
self.assertTrue(data[0] == new_row)
-
+
+
def test_formatters(self):
"""Confirm formatters are being triggered."""