diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-11-17 20:02:08 -0500 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-11-17 20:02:08 -0500 |
| commit | 196edb82ccbfbca2fe6696f69973384cf570c7f9 (patch) | |
| tree | b7c12225140be590ce3229656738487a2bb52cc8 /test_tablib.py | |
| parent | a2990d5852206ac0ab11fa87bb256b3924871169 (diff) | |
| download | tablib-196edb82ccbfbca2fe6696f69973384cf570c7f9.tar.gz | |
trailing whitespae
Diffstat (limited to 'test_tablib.py')
| -rwxr-xr-x | test_tablib.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test_tablib.py b/test_tablib.py index 40e83ce..8e2454f 100755 --- a/test_tablib.py +++ b/test_tablib.py @@ -194,7 +194,7 @@ class TablibTestCase(unittest.TestCase): data.tsv data.xls - + def test_book_export_no_exceptions(self): """Test that varoius exports don't error out.""" @@ -245,7 +245,7 @@ class TablibTestCase(unittest.TestCase): self.assertEqual(_yaml, data.yaml) - + def test_yaml_import_book(self): """Generate and import YAML book serialization.""" data.append(self.john) @@ -258,7 +258,7 @@ class TablibTestCase(unittest.TestCase): book.yaml = _yaml self.assertEqual(_yaml, book.yaml) - + def test_csv_import_set(self): """Generate and import CSV set serialization.""" @@ -286,7 +286,7 @@ class TablibTestCase(unittest.TestCase): def test_csv_format_detect(self): """Test CSV format detection.""" - + _csv = ( '1,2,3\n' '4,5,6\n' @@ -295,13 +295,13 @@ class TablibTestCase(unittest.TestCase): _bunk = ( '¡¡¡¡¡¡¡¡£™∞¢£§∞§¶•¶ª∞¶•ªº••ª–º§•†•§º¶•†¥ª–º•§ƒø¥¨©πƒø†ˆ¥ç©¨√øˆ¥≈†ƒ¥ç©ø¨çˆ¥ƒçø¶' ) - + self.assertTrue(tablib.formats.csv.detect(_csv)) self.assertFalse(tablib.formats.csv.detect(_bunk)) def test_tsv_format_detect(self): """Test TSV format detection.""" - + _tsv = ( '1\t2\t3\n' '4\t5\t6\n' @@ -310,7 +310,7 @@ class TablibTestCase(unittest.TestCase): _bunk = ( '¡¡¡¡¡¡¡¡£™∞¢£§∞§¶•¶ª∞¶•ªº••ª–º§•†•§º¶•†¥ª–º•§ƒø¥¨©πƒø†ˆ¥ç©¨√øˆ¥≈†ƒ¥ç©ø¨çˆ¥ƒçø¶' ) - + self.assertTrue(tablib.formats.tsv.detect(_tsv)) self.assertFalse(tablib.formats.tsv.detect(_bunk)) @@ -357,23 +357,23 @@ class TablibTestCase(unittest.TestCase): transposed_founders = self.founders.transpose() first_row = transposed_founders[0] second_row = transposed_founders[1] - + self.assertEqual(transposed_founders.headers, ["first_name","John", "George", "Thomas"]) self.assertEqual(first_row, ("last_name","Adams", "Washington", "Jefferson")) self.assertEqual(second_row, ("gpa",90, 67, 50)) - + def test_row_stacking(self): """Row stacking.""" to_join = tablib.Dataset(headers=self.founders.headers) - + for row in self.founders: to_join.append(row=row) - + row_stacked = self.founders.stack_rows(to_join) for column in row_stacked.headers: @@ -387,7 +387,7 @@ class TablibTestCase(unittest.TestCase): """Column stacking""" to_join = tablib.Dataset(headers=self.founders.headers) - + for row in self.founders: to_join.append(row=row) @@ -401,7 +401,7 @@ class TablibTestCase(unittest.TestCase): self.assertEqual(column_stacked[0], ("John", "Adams", 90, "John", "Adams", 90)) - + def test_wipe(self): """Purge a dataset.""" |
