/[thuban]/branches/WIP-pyshapelib-bramz/libraries/pyshapelib/testdbf.py
ViewVC logotype

Contents of /branches/WIP-pyshapelib-bramz/libraries/pyshapelib/testdbf.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1762 - (show annotations)
Mon Sep 29 10:52:38 2003 UTC (21 years, 5 months ago) by bh
Original Path: trunk/thuban/libraries/pyshapelib/testdbf.py
File MIME type: text/x-python
File size: 710 byte(s)
New. Test cases for the dbflib bindings based on the
unittest module

1 # Copyright (C) 2003 by Intevation GmbH
2 # Authors:
3 # Bernhard Herzog <[email protected]>
4 #
5 # This program is free software under the LGPL (>=v2)
6 # Read the file COPYING coming with the software for details.
7
8 """Test cases for the dbflib python bindings"""
9
10 __version__ = "$Revision$"
11 # $Source$
12 # $Id$
13
14 import unittest
15 import dbflib
16
17 class TestDBF(unittest.TestCase):
18
19 def test_add_field(self):
20 """Test whethe add_field reports exceptions"""
21 dbf = dbflib.create("test.dbf")
22 # For strings the precision parameter must be 0
23 self.assertRaises(RuntimeError,
24 dbf.add_field, "str", dbflib.FTString, 10, 5)
25
26
27 if __name__ == "__main__":
28 unittest.main()

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26