Index: unk/anuga_core/source/anuga/fit_interpolate/test/test_all.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test/test_all.py	(revision 9479)
+++ 	(revision )
@@ -1,83 +1,0 @@
-"""Regression testing framework
-This module will search for scripts in the same directory named
-test_*.py.  Each such script should be a test suite that tests a
-module through PyUnit. This script will aggregate all
-found test suites into one big test suite and run them all at once.
-"""
-
-# Author: Mark Pilgrim
-# Modified by Ole Nielsen
-
-import unittest
-import os
-
-
-#List files that should be excluded from the testing process.
-#E.g. if they are known to fail and under development
-#exclude = ['test_interpolate_sww.py'] 
-
-
-def get_test_files(path):
-
-    import sys
-
-    files = os.listdir(path)
-
-    #Check sub directories
-    test_files = []
-    for file in files:
-        if os.path.isdir(file):
-            sys.path.append(file)
-            #print 'Recursing into', file
-            test_files += get_test_files(path + os.sep + file)
-        elif file[:5] == 'test_' and file[-2:] == 'py':
-            #print 'Appending', file
-            test_files.append(file)
-        else:
-            pass
-    return test_files
-
-
-
-def regressionTest():
-    import sys, os, re, unittest
-    path = os.path.split(sys.argv[0])[0] or os.getcwd()
-
-
-    files = get_test_files(path)
-
-
-
-    #test = re.compile('^test_[\w]*.py$', re.IGNORECASE)
-    #files = filter(test.search, files)
-
-
-    try:
-        files.remove(__file__)  #Remove self from list (Ver 2.3. or later)
-    except:
-        files.remove('test_all.py')
-
-    print 'Testing:'
-    for file in files:
-        print '  ' + file
-
-    if globals().has_key('exclude'):
-        for file in exclude:
-            files.remove(file)
-            print 'WARNING: File '+ file + ' excluded from testing'
-
-
-    filenameToModuleName = lambda f: os.path.splitext(f)[0]
-    #print "files",files 
-    moduleNames = map(filenameToModuleName, files)
-    #print "moduleNames",moduleNames
-    modules = map(__import__, moduleNames)
-    load = unittest.defaultTestLoader.loadTestsFromModule
-    return unittest.TestSuite(map(load, modules))
-
-################################################################################
-
-if __name__ == '__main__':
-    suite = regressionTest()
-    runner = unittest.TextTestRunner() #(verbosity=2)
-    runner.run(suite)
Index: /trunk/anuga_core/source/anuga/fit_interpolate/test/test_fit.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test/test_fit.py	(revision 9479)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/test/test_fit.py	(revision 9480)
@@ -13,5 +13,5 @@
 import os
 
-from fit import *
+from anuga.fit_interpolate.fit import *
 from anuga.abstract_2d_finite_volumes.neighbour_mesh import Mesh
 from anuga.utilities.sparse import Sparse, Sparse_CSR
@@ -286,44 +286,4 @@
         os.remove(txt_file)
         
-    def cache_test_fit_to_mesh_pts(self):
-        a = [-1.0, 0.0]
-        b = [3.0, 4.0]
-        c = [4.0,1.0]
-        d = [-3.0, 2.0] #3
-        e = [-1.0,-2.0]
-        f = [1.0, -2.0] #5
-
-        vertices = [a, b, c, d,e,f]
-        triangles = [[0,1,3], [1,0,2], [0,4,5], [0,5,2]] #abd bac aef afc
-
-
-        fileName = tempfile.mktemp(".txt")
-        file = open(fileName,"w")
-        file.write(" x, y, elevation \n\
--2.0, 2.0, 0.\n\
--1.0, 1.0, 0.\n\
-0.0, 2.0 , 2.\n\
-1.0, 1.0 , 2.\n\
- 2.0,  1.0 ,3. \n\
- 0.0,  0.0 , 0.\n\
- 1.0,  0.0 , 1.\n\
- 0.0,  -1.0, -1.\n\
- -0.2, -0.5, -0.7\n\
- -0.9, -1.5, -2.4\n\
- 0.5,  -1.9, -1.4\n\
- 3.0,  1.0 , 4.\n")
-        file.close()
-        geo = Geospatial_data(fileName)
-        fileName_pts = tempfile.mktemp(".pts")
-        points = geo.get_data_points(absolute=True)
-        atts = geo.get_attributes()
-        f = fit_to_mesh(points,atts, vertices, triangles,
-                                alpha=0.0, max_read_lines=2,
-                        use_cache=True, verbose=True)
-        answer = linear_function(vertices)
-        #print "f\n",f
-        #print "answer\n",answer
-        assert num.allclose(f, answer)
-        os.remove(fileName)
        
     def test_fit_to_mesh_pts(self):
@@ -1182,41 +1142,4 @@
         os.remove(point_file)
   
-    def Not_yet_test_smooth_att_to_mesh_with_excess_verts(self):
-
-        a = [0.0, 0.0]
-        b = [0.0, 5.0]
-        c = [5.0, 0.0]
-        d = [1.0, 1.0]
-        e = [18.0, 1000.0]
-        
-        points = [a, b, c, d, e]
-        triangles = [ [1,0,2] ]   #bac
-
-        d1 = [1.0, 1.0]
-        d2 = [1.0, 2.0]
-        d3 = [3.0,1.0]
-        d4 = [2.0,3.0]
-        d5 = [2.0,2.0]
-        d6 = [1.0,3.0]
-        data_coords = [d1, d2, d3, d4, d5, d6]
-        z = linear_function(data_coords)
-        #print "z",z 
-
-        interp = Fit(points, triangles, alpha=0.0)
-        
-        try:
-            f = interp.fit(data_coords, z)
-        except VertsWithNoTrianglesError:
-            pass
-        else:
-            raise Exception('Verts with no triangles did not raise error!')
-        
-        #f = interp.fit(data_coords, z)
-        #answer = linear_function(points)
-
-        #  Removing the bad verts that we don't care about
-        #f = f[0:3]
-        #answer = answer[0:3]
-        #assert allclose(f, answer)
 
 #-------------------------------------------------------------
Index: /trunk/anuga_core/source/anuga/fit_interpolate/test/test_interpolate2d.py
===================================================================
--- /trunk/anuga_core/source/anuga/fit_interpolate/test/test_interpolate2d.py	(revision 9479)
+++ /trunk/anuga_core/source/anuga/fit_interpolate/test/test_interpolate2d.py	(revision 9480)
@@ -14,5 +14,5 @@
 import numpy
 
-from interpolate2d import interpolate2d
+from anuga.fit_interpolate.interpolate2d import interpolate2d
 
 
@@ -466,4 +466,4 @@
 if __name__ == '__main__':
     suite = unittest.makeSuite(Test_interpolate, 'test')
-    runner = unittest.TextTestRunner(verbosity=2)
+    runner = unittest.TextTestRunner(verbosity=1)
     runner.run(suite)
Index: /trunk/anuga_core/source/anuga/geometry/test/test_polygon.py
===================================================================
--- /trunk/anuga_core/source/anuga/geometry/test/test_polygon.py	(revision 9479)
+++ /trunk/anuga_core/source/anuga/geometry/test/test_polygon.py	(revision 9480)
@@ -23,5 +23,5 @@
 
 
-def test_function(x, y):
+def simple_function(x, y):
     return x+y
 
@@ -162,21 +162,21 @@
         p2 = [[0,0], [10,10], [15,5], [20, 10], [25,0], [30,10], [40,-10]]
 
-        f = Polygon_function([(p1, test_function)])
+        f = Polygon_function([(p1, simple_function)])
         z = f([5, 5, 27, 35], [5, 9, 8, -5]) # Two first inside p1
         assert num.allclose(z, [10, 14, 0, 0])
 
         # Combined
-        f = Polygon_function([(p1, test_function), (p2, 2.0)])
+        f = Polygon_function([(p1, simple_function), (p2, 2.0)])
         z = f([5, 5, 27, 35], [5, 9, 8, -5])
         assert num.allclose(z, [2, 14, 0, 2])
 
         # Combined w default
-        f = Polygon_function([(p1, test_function), (p2, 2.0)], default = 3.14)
+        f = Polygon_function([(p1, simple_function), (p2, 2.0)], default = 3.14)
         z = f([5, 5, 27, 35], [5, 9, 8, -5])
         assert num.allclose(z, [2, 14, 3.14, 2])
 
         # Combined w default func
-        f = Polygon_function([(p1, test_function), (p2, 2.0)],
-                             default=test_function)
+        f = Polygon_function([(p1, simple_function), (p2, 2.0)],
+                             default=simple_function)
         z = f([5, 5, 27, 35], [5, 9, 8, -5])
         assert num.allclose(z, [2, 14, 35, 2])
@@ -867,5 +867,5 @@
     # This function tests all parallel line cases for 4 collinear points.
     # This function should never be run directly by the unittest code.
-    def helper_test_parallel_intersection_code(self, P1, P2, P3, P4):
+    def helper_parallel_intersection_code(self, P1, P2, P3, P4):
         # lines in same direction, no overlap
         # 0:         ---->----
@@ -1376,16 +1376,16 @@
         P4 = [4.0, 4.0]
 
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [1.0, 1.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [1.0, 1.0]
         P2 = [2.0, 2.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P2 = [2.0, 2.0]
         P3 = [3.0, 3.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P3 = [3.0, 3.0]
         P4 = [4.0, 4.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_TL(self):
@@ -1402,16 +1402,16 @@
         P4 = [-4.0, 4.0]
 
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [-1.0, 1.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [-1.0, 1.0]
         P2 = [-2.0, 2.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P2 = [-2.0, 2.0]
         P3 = [-3.0, 3.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P3 = [-3.0, 3.0]
         P4 = [-4.0, 4.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_BL(self):
@@ -1428,16 +1428,16 @@
         P4 = [-4.0, -4.0]
 
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [-1.0, -1.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [-1.0, -1.0]
         P2 = [-2.0, -2.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P2 = [-2.0, -2.0]
         P3 = [-3.0, -3.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P3 = [-3.0, -3.0]
         P4 = [-4.0, -4.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_BR(self):
@@ -1454,16 +1454,16 @@
         P4 = [4.0, -4.0]
 
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [1.0, -1.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P1 = [1.0, -1.0]
         P2 = [2.0, -2.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P2 = [2.0, -2.0]
         P3 = [3.0, -3.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
         P3 = [3.0, -3.0]
         P4 = [4.0, -4.0+1.0e-9]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_TR_TL(self):
@@ -1479,5 +1479,5 @@
         P3 = [ 2.0, 6.0]
         P4 = [ 3.0, 7.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 2 in TL, 2 in TR
@@ -1487,5 +1487,5 @@
         P3 = [ 2.0, 6.0]
         P4 = [ 3.0, 7.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 3 in TL, 1 in TR
@@ -1495,5 +1495,5 @@
         P3 = [-1.0, 3.0]
         P4 = [ 3.0, 7.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_TR_BL(self):
@@ -1509,5 +1509,5 @@
         P3 = [ 2.0,  3.0]
         P4 = [ 3.0,  4.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 2 in TL, 2 in TR
@@ -1517,5 +1517,5 @@
         P3 = [ 2.0,  3.0]
         P4 = [ 3.0,  4.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 3 in TL, 1 in TR
@@ -1525,5 +1525,5 @@
         P3 = [-2.0, -1.0]
         P4 = [ 3.0,  4.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
     def test_intersection_bug_20081110_TR_BR(self):
@@ -1539,5 +1539,5 @@
         P3 = [ 6.0,  2.0]
         P4 = [ 7.0,  3.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 2 in BR, 2 in TR
@@ -1547,5 +1547,5 @@
         P3 = [ 6.0,  2.0]
         P4 = [ 7.0,  3.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
         # define 4 collinear points, 3 in BR, 1 in TR
@@ -1555,5 +1555,5 @@
         P3 = [ 3.0, -1.0]
         P4 = [ 7.0,  3.0]
-        self.helper_test_parallel_intersection_code(P1, P2, P3, P4)
+        self.helper_parallel_intersection_code(P1, P2, P3, P4)
 
 
