File: test_table.py

package info (click to toggle)
python-agate-dbf 0.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 192 kB
  • sloc: makefile: 126; python: 106
file content (21 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python
# -*- coding: utf8 -*-

try:
    import unittest2 as unittest
except ImportError:
    import unittest

import agate
import agatedbf

class TestDBF(agate.AgateTestCase):
    def setUp(self):
        self.table = agate.Table.from_csv('examples/testdbf_converted.csv')

    def test_from_dbf(self):
        table = agate.Table.from_dbf('examples/test.dbf')

        self.assertColumnNames(table, self.table.column_names)
        self.assertColumnTypes(table, [t.__class__ for t in self.table.column_types])
        self.assertRows(table, self.table.rows)