/[thuban]/branches/WIP-pyshapelib-bramz/test/postgissupport.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/postgissupport.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1679 by bh, Thu Aug 28 14:23:08 2003 UTC revision 1947 by bh, Thu Nov 13 18:56:49 2003 UTC
# Line 486  def skip_if_no_postgis(): Line 486  def skip_if_no_postgis():
486      if _cannot_run_postgis_tests:      if _cannot_run_postgis_tests:
487          raise support.SkipTest(_cannot_run_postgis_tests)          raise support.SkipTest(_cannot_run_postgis_tests)
488    
489    def skip_if_addgeometrycolumn_does_not_use_quote_ident():
490        """Skip a test if the AddGeometryColumn function doesn't use quote_ident
491    
492        If the AddGeometryColumn function doesn't use quote_ident it doesn't
493        support unusual table or column names properly, that is, it will
494        fail with errors for names that contain spaces or double quotes.
495    
496        The test performed by this function is a bit simplistic because it
497        only tests whether the string 'quote_ident' occurs anywhere in the
498        postgis.sql file. This will hopefully works because when this was
499        fixed in postgis CVS AddGeometryColumn was the first function to use
500        quote_ident.
501        """
502        f = file(find_postgis_sql())
503        content = f.read()
504        f.close()
505        if content.find("quote_ident") < 0:
506            raise support.SkipTest("AddGeometryColumn doesn't use quote_ident")
507    
508  def coords_to_point(coords):  def coords_to_point(coords):
509      """Return string with a WKT representation of the point in coords"""      """Return string with a WKT representation of the point in coords"""
510      x, y = coords[0]      x, y = coords[0]

Legend:
Removed from v.1679  
changed lines
  Added in v.1947

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26