mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 23:10:17 +00:00
Testing fixtures for fixed bugs.
This commit is contained in:
+17
-2
@@ -13,12 +13,27 @@ class TablibTestCase(unittest.TestCase):
|
||||
pass
|
||||
|
||||
def test_empty_append(self):
|
||||
|
||||
data = tablib.Dataset()
|
||||
|
||||
new_row = (1,2,3)
|
||||
data.append(new_row)
|
||||
assert data.width == len(new_row)
|
||||
|
||||
self.assertTrue(data.width == len(new_row))
|
||||
|
||||
|
||||
def test_empty_append_with_headers(self):
|
||||
|
||||
data = tablib.Dataset()
|
||||
|
||||
data.headers = ['first', 'second']
|
||||
new_row = (1,2,3,4)
|
||||
|
||||
|
||||
self.assertRaises(tablib.InvalidDimensions, data.append, new_row)
|
||||
|
||||
# def test_adding_header with (self):
|
||||
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user