Index: test/README.rst
===================================================================
--- test/README.rst	(revision 6c007022258cff8efb5208e90301244c22e30170)
+++ test/README.rst	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -9,7 +9,7 @@
 only need to rebuild between tests if you are modifying the C code.
 
-Tests can be run in Eclipse (or other IDE) by selecting *utest_sansview.py*
+Tests can be run in Eclipse (or other IDE) by selecting *utest_sasview.py*
 and selecting run.  This will run all of the tests.  To run tests for one
-one package, edit the *utest_sansview.py* run command and add the package
+one package, edit the *utest_sasview.py* run command and add the package
 directory to the command arguments.  To run an individual test,
 select *run_one.py* and edit the command arguments to include the path to
Index: test/calculatorview/test/utest_gui_sld.py
===================================================================
--- test/calculatorview/test/utest_gui_sld.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/calculatorview/test/utest_gui_sld.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -19,5 +19,5 @@
         """
         self.app = wx.App()
-        from sans.perspectives.calculator.sld_panel import SldWindow
+        from sas.perspectives.calculator.sld_panel import SldWindow
         self.sld_frame = SldWindow()
        
Index: test/park_integration/test/batch_fit.py
===================================================================
--- test/park_integration/test/batch_fit.py	(revision e3efa6b33f61b244c04b2476cabdadf01a183b76)
+++ test/park_integration/test/batch_fit.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -2,9 +2,9 @@
 import time
 import unittest
-from sans.dataloader.loader import Loader
-from sans.fit.Fitting import Fit
-from sans.models.CylinderModel import CylinderModel
-import sans.models.dispersion_models 
-from sans.models.qsmearing import smear_selection
+from sas.dataloader.loader import Loader
+from sas.fit.Fitting import Fit
+from sas.models.CylinderModel import CylinderModel
+import sas.models.dispersion_models 
+from sas.models.qsmearing import smear_selection
 
 NPTS = 1
@@ -33,5 +33,5 @@
         self.list_of_constraints = []
         self.list_of_mapper = []
-        self.polydisp = sans.models.dispersion_models.models
+        self.polydisp = sas.models.dispersion_models.models
         self.qmin = qmin
         self.qmax = qmin
Index: test/park_integration/test/utest_fit_cylinder.py
===================================================================
--- test/park_integration/test/utest_fit_cylinder.py	(revision eff93b8d577de85b34ffd99e484da07484c35580)
+++ test/park_integration/test/utest_fit_cylinder.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,7 +6,7 @@
 import math
 
-from sans.fit.AbstractFitEngine import Model
-from sans.fit.Fitting import Fit
-from sans.dataloader.loader import Loader
+from sas.fit.AbstractFitEngine import Model
+from sas.fit.Fitting import Fit
+from sas.dataloader.loader import Loader
 
 #@unittest.skip("")
@@ -17,5 +17,5 @@
         self.data = Loader().load("cyl_400_20.txt")
         # Create model that fitting engine understands
-        from sans.models.CylinderModel import CylinderModel
+        from sas.models.CylinderModel import CylinderModel
         self.model  = CylinderModel()
         self.model.setParam("scale", 1.0)
@@ -70,5 +70,5 @@
     
         # Receives the type of model for the fitting
-        from sans.models.CylinderModel import CylinderModel
+        from sas.models.CylinderModel import CylinderModel
         cyl1  = CylinderModel()
         cyl1.name = "C1"
Index: test/park_integration/test/utest_fit_line.py
===================================================================
--- test/park_integration/test/utest_fit_line.py	(revision e3efa6b33f61b244c04b2476cabdadf01a183b76)
+++ test/park_integration/test/utest_fit_line.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,9 +6,9 @@
 import math
 
-from sans.fit.AbstractFitEngine import Model, FitHandler
-from sans.dataloader.loader import Loader
-from sans.fit.Fitting import Fit
-from sans.models.LineModel import LineModel
-from sans.models.Constant import Constant
+from sas.fit.AbstractFitEngine import Model, FitHandler
+from sas.dataloader.loader import Loader
+from sas.fit.Fitting import Fit
+from sas.models.LineModel import LineModel
+from sas.models.Constant import Constant
 
 class testFitModule(unittest.TestCase):
Index: test/park_integration/test/utest_fit_smeared.py
===================================================================
--- test/park_integration/test/utest_fit_smeared.py	(revision e3efa6b33f61b244c04b2476cabdadf01a183b76)
+++ test/park_integration/test/utest_fit_smeared.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -7,10 +7,10 @@
 
 import numpy
-from sans.fit.AbstractFitEngine import Model
-from sans.fit.Fitting import Fit
-from sans.dataloader.loader import Loader
-from sans.models.qsmearing import smear_selection
-from sans.models.CylinderModel import CylinderModel
-from sans.models.SphereModel import SphereModel
+from sas.fit.AbstractFitEngine import Model
+from sas.fit.Fitting import Fit
+from sas.dataloader.loader import Loader
+from sas.models.qsmearing import smear_selection
+from sas.models.CylinderModel import CylinderModel
+from sas.models.SphereModel import SphereModel
 
 class testFitModule(unittest.TestCase):
@@ -157,5 +157,5 @@
 
         # Model: maybe there's a better way to do this.
-        # Ideally we should have to create a new model from our sans model.
+        # Ideally we should have to create a new model from our sas model.
         fitter.set_model(Model(self.sphere),1, ['radius','scale', 'background'])
         
Index: test/park_integration/test/utest_park_scipy.py
===================================================================
--- test/park_integration/test/utest_park_scipy.py	(revision e544c84d2610bcd83dba5154fafcc4691034075a)
+++ test/park_integration/test/utest_park_scipy.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,11 +6,11 @@
 import math
 
-from sans.guiframe.dataFitting import Data1D 
-from sans.fit.AbstractFitEngine import Model,FitData1D
-from sans.fit.Fitting import Fit
-from sans.dataloader.loader import Loader
-from sans.models.MultiplicationModel import MultiplicationModel
-from sans.models.CylinderModel import CylinderModel
-from sans.models.SquareWellStructure import SquareWellStructure
+from sas.guiframe.dataFitting import Data1D 
+from sas.fit.AbstractFitEngine import Model,FitData1D
+from sas.fit.Fitting import Fit
+from sas.dataloader.loader import Loader
+from sas.models.MultiplicationModel import MultiplicationModel
+from sas.models.CylinderModel import CylinderModel
+from sas.models.SquareWellStructure import SquareWellStructure
 
 class testFitModule(unittest.TestCase):
Index: test/park_integration/test/utest_small_test.py
===================================================================
--- test/park_integration/test/utest_small_test.py	(revision 76f132a28f8a87fc91ae4fe9b234ceda800fa202)
+++ test/park_integration/test/utest_small_test.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -4,6 +4,6 @@
 import unittest
 import math
-from sans.fit.Fitting import Fit
-from sans.dataloader.loader import Loader
+from sas.fit.Fitting import Fit
+from sas.dataloader.loader import Loader
 
 class testFitModule(unittest.TestCase):
@@ -16,5 +16,5 @@
         fitter = Fit('scipy')
         # Receives the type of model for the fitting
-        from sans.models.CylinderModel import CylinderModel
+        from sas.models.CylinderModel import CylinderModel
         model  = CylinderModel()
         model.setParam('sldCyl', 1)
Index: test/pr_inversion/test/test_module.py
===================================================================
--- test/pr_inversion/test/test_module.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/pr_inversion/test/test_module.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -1,3 +1,3 @@
-from sans.pr.core.pr_inversion import Cinvertor
+from sas.pr.core.pr_inversion import Cinvertor
 import numpy
 
Index: test/pr_inversion/test/utest_explorer.py
===================================================================
--- test/pr_inversion/test/utest_explorer.py	(revision 5777106e8a4a0a62fe2ee0fbaf7c0aa19c0bb92b)
+++ test/pr_inversion/test/utest_explorer.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -5,6 +5,6 @@
 import unittest, math, numpy
 from utest_invertor import load
-from sans.pr.invertor import Invertor
-from sans.pr.distance_explorer import DistExplorer
+from sas.pr.invertor import Invertor
+from sas.pr.distance_explorer import DistExplorer
         
 class TestExplorer(unittest.TestCase):
Index: test/pr_inversion/test/utest_invertor.py
===================================================================
--- test/pr_inversion/test/utest_invertor.py	(revision 95fb3e8659be4e20c87d88465e68b8077488a368)
+++ test/pr_inversion/test/utest_invertor.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -9,5 +9,5 @@
 
 import unittest, math, numpy
-from sans.pr.invertor import Invertor
+from sas.pr.invertor import Invertor
         
 class TestFiguresOfMerit(unittest.TestCase):
Index: test/sascalculator/test/utest_resolution_calculator.py
===================================================================
--- test/sascalculator/test/utest_resolution_calculator.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sascalculator/test/utest_resolution_calculator.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -4,5 +4,5 @@
 
 import unittest
-from  sans.calculator.resolution_calculator import ResolutionCalculator \
+from  sas.calculator.resolution_calculator import ResolutionCalculator \
                                             as calculator
 
Index: test/sascalculator/test/utest_sans_gen.py
===================================================================
--- test/sascalculator/test/utest_sans_gen.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sascalculator/test/utest_sans_gen.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -1,4 +1,4 @@
 """
-Unit tests for the sans_gen
+Unit tests for the sas_gen
 """
 import warnings
@@ -6,6 +6,6 @@
 
 import unittest
-from sans.calculator import sans_gen
-from sans.models.SphereModel import SphereModel
+from sas.calculator import sas_gen
+from sas.models.SphereModel import SphereModel
 
 import numpy
@@ -13,10 +13,10 @@
 import os.path
 
-class sans_gen_test(unittest.TestCase):
+class sas_gen_test(unittest.TestCase):
     
     def setUp(self):
-        self.sldloader = sans_gen.SLDReader()
-        self.pdbloader = sans_gen.PDBReader()
-        self.omfloader = sans_gen.OMFReader() 
+        self.sldloader = sas_gen.SLDReader()
+        self.pdbloader = sas_gen.PDBReader()
+        self.omfloader = sas_gen.OMFReader() 
         self.comp = SphereModel()
         
@@ -44,5 +44,5 @@
         """
         f = self.omfloader.read("A_Raw_Example-1.omf")
-        output = sans_gen.OMF2SLD()
+        output = sas_gen.OMF2SLD()
         output.set_data(f)
         self.assertEqual(f.mx[0], 0)
@@ -57,5 +57,5 @@
         sld_data = self.sldloader.read("sphere697_r30.sld")
         # Generic computation  
-        model = sans_gen.GenSAS()
+        model = sas_gen.GenSAS()
         model.setParam('background', 0.0)
         model.setParam('scale', 1.0)
Index: test/sascalculator/test/utest_slit_length_calculator.py
===================================================================
--- test/sascalculator/test/utest_slit_length_calculator.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sascalculator/test/utest_slit_length_calculator.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -4,6 +4,6 @@
 
 import unittest
-from sans.dataloader.readers.ascii_reader import Reader
-from  sans.calculator.slit_length_calculator import SlitlengthCalculator as calculator
+from sas.dataloader.readers.ascii_reader import Reader
+from  sas.calculator.slit_length_calculator import SlitlengthCalculator as calculator
 
 import os.path
Index: test/sasdataloader/plugins/test_reader.py
===================================================================
--- test/sasdataloader/plugins/test_reader.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/plugins/test_reader.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -9,5 +9,5 @@
 """
 import numpy, os
-from sans.dataloader.data_info import Data1D
+from sas.dataloader.data_info import Data1D
 
 
Index: test/sasdataloader/test/error_conditions.py
===================================================================
--- test/sasdataloader/test/error_conditions.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/error_conditions.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -1,3 +1,3 @@
-from sans.dataloader.loader import Loader
+from sas.dataloader.loader import Loader
 import unittest
 
Index: test/sasdataloader/test/testLoad.py
===================================================================
--- test/sasdataloader/test/testLoad.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/testLoad.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -14,6 +14,6 @@
 import unittest
 import math
-import sans.dataloader
-from sans.dataloader.loader import  Loader
+import sas.dataloader
+from sas.dataloader.loader import  Loader
 
 # Check whether we should test image loading on this system 
Index: test/sasdataloader/test/testplugings.py
===================================================================
--- test/sasdataloader/test/testplugings.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/testplugings.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -4,5 +4,5 @@
 
 import unittest
-from sans.dataloader.loader import  Loader, Registry
+from sas.dataloader.loader import  Loader, Registry
 class testLoader(unittest.TestCase):
     
Index: test/sasdataloader/test/utest_abs_reader.py
===================================================================
--- test/sasdataloader/test/utest_abs_reader.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/utest_abs_reader.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -5,6 +5,6 @@
 import unittest
 import numpy, math
-from sans.dataloader.loader import  Loader
-from sans.dataloader.data_info import Data1D
+from sas.dataloader.loader import  Loader
+from sas.dataloader.data_info import Data1D
  
 import os.path
@@ -13,5 +13,5 @@
     
     def setUp(self):
-        from sans.dataloader.readers.abs_reader import Reader
+        from sas.dataloader.readers.abs_reader import Reader
         self.data = Reader().read("jan08002.ABS")
         
@@ -311,5 +311,5 @@
         
     def test_writer(self):
-        from sans.dataloader.readers.cansas_reader import Reader
+        from sas.dataloader.readers.cansas_reader import Reader
         r = Reader()
         x = numpy.ones(5)
Index: test/sasdataloader/test/utest_ascii.py
===================================================================
--- test/sasdataloader/test/utest_ascii.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/utest_ascii.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,5 +6,5 @@
 
 import unittest
-from sans.dataloader.loader import  Loader
+from sas.dataloader.loader import  Loader
  
 import os.path
Index: test/sasdataloader/test/utest_averaging.py
===================================================================
--- test/sasdataloader/test/utest_averaging.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/utest_averaging.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -2,10 +2,10 @@
 import unittest
 
-from sans.dataloader.loader import  Loader
-from sans.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter
+from sas.dataloader.loader import  Loader
+from sas.dataloader.manipulations import Ring, CircularAverage, SectorPhi, get_q,reader2D_converter
  
 import os.path
 import numpy, math
-import sans.dataloader.data_info as data_info
+import sas.dataloader.data_info as data_info
 
 class Averaging(unittest.TestCase):
@@ -137,5 +137,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import Boxsum, Boxavg
+        from sas.dataloader.manipulations import Boxsum, Boxavg
         
         r = Boxsum(x_min=.01, x_max=.015, y_min=0.01, y_max=0.015)
@@ -155,5 +155,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import SlabX
+        from sas.dataloader.manipulations import SlabX
         
         r = SlabX(x_min=-.01, x_max=.01, y_min=-0.0002, y_max=0.0002, bin_width=0.0004)
@@ -172,5 +172,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import SlabY
+        from sas.dataloader.manipulations import SlabY
         
         r = SlabY(x_min=.005, x_max=.01, y_min=-0.01, y_max=0.01, bin_width=0.0004)
@@ -191,5 +191,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import SectorPhi
+        from sas.dataloader.manipulations import SectorPhi
         import math
         
@@ -209,5 +209,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import SectorPhi
+        from sas.dataloader.manipulations import SectorPhi
         import math
         
@@ -227,5 +227,5 @@
             The test data was not generated by IGOR.
         """
-        from sans.dataloader.manipulations import SectorQ
+        from sas.dataloader.manipulations import SectorQ
         import math
         
Index: test/sasdataloader/test/utest_cansas.py
===================================================================
--- test/sasdataloader/test/utest_cansas.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/utest_cansas.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,10 +6,10 @@
 warnings.simplefilter("ignore")
 
-import sans.dataloader.readers.cansas_reader as cansas
-from sans.dataloader.loader import Loader
-from sans.dataloader.data_info import Data1D
-from sans.dataloader.readers.xml_reader import XMLreader
-from sans.dataloader.readers.cansas_reader import Reader
-from sans.dataloader.readers.cansas_constants import CansasConstants
+import sas.dataloader.readers.cansas_reader as cansas
+from sas.dataloader.loader import Loader
+from sas.dataloader.data_info import Data1D
+from sas.dataloader.readers.xml_reader import XMLreader
+from sas.dataloader.readers.cansas_reader import Reader
+from sas.dataloader.readers.cansas_constants import CansasConstants
 
 import os
Index: test/sasdataloader/test/utest_red2d_reader.py
===================================================================
--- test/sasdataloader/test/utest_red2d_reader.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasdataloader/test/utest_red2d_reader.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,5 +6,5 @@
 
 import unittest
-from sans.dataloader.loader import  Loader
+from sas.dataloader.loader import  Loader
  
 import os.path
Index: test/sasguiframe/test/utest_manipulations.py
===================================================================
--- test/sasguiframe/test/utest_manipulations.py	(revision 8c9ffde290eafed946f800881bf4901b48445d4c)
+++ test/sasguiframe/test/utest_manipulations.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -6,7 +6,7 @@
 import unittest
 import numpy, math
-from sans.dataloader.loader import  Loader
-from sans.guiframe.dataFitting import Data1D, Data2D
-from sans.guiframe.dataFitting import Data1D as Theory1D
+from sas.dataloader.loader import  Loader
+from sas.guiframe.dataFitting import Data1D, Data2D
+from sas.guiframe.dataFitting import Data1D as Theory1D
  
 import os.path
Index: test/utest_sansview.py
===================================================================
--- test/utest_sansview.py	(revision 95fb3e8659be4e20c87d88465e68b8077488a368)
+++ 	(revision )
@@ -1,102 +1,0 @@
-#!/usr/bin/env python
-import os
-import subprocess
-import re
-import sys
-try:
-    import xmlrunner
-except:
-    print "xmlrunner needs to be installed to run these tests"
-    print "Try easy_install unittest-xml-reporting"
-    sys.exit(1)
-
-# Check whether we have matplotlib installed
-HAS_MPL_WX = True
-try:
-    import matplotlib
-    import wx
-except:
-    HAS_MPL_WX = False
-
-SKIPPED_DIRS = ["sansrealspace", "calculatorview"]
-if not HAS_MPL_WX:
-    SKIPPED_DIRS.append("sansguiframe")
-
-#COMMAND_SEP = ';'
-#if os.name == 'nt':
-#    COMMAND_SEP = '&'
-
-def run_tests(dirs=None, all=False):
-    test_root = os.path.abspath(os.path.dirname(__file__))
-    run_one_py = os.path.join(test_root, 'run_one.py')
-    passed = 0
-    failed = 0
-    n_tests = 0
-    n_errors = 0
-    n_failures = 0
-    
-    for d in (dirs if dirs else os.listdir(test_root)):
-        
-        # Check for modules to be skipped
-        if d in SKIPPED_DIRS:
-            continue
-        
-        # Go through modules looking for unit tests
-        module_dir = os.path.join(test_root, d, "test")
-        if os.path.isdir(module_dir):
-            for f in os.listdir(module_dir):
-                file_path = os.path.join(module_dir,f)
-                if os.path.isfile(file_path) and f.startswith("utest_") and f.endswith(".py"):
-                    module_name,_ = os.path.splitext(f)
-                    code = '"%s" %s %s'%(sys.executable, run_one_py, file_path)
-                    proc = subprocess.Popen(code, shell=True, stdout=subprocess.PIPE, stderr = subprocess.STDOUT)
-                    std_out, std_err = proc.communicate()
-                    #print std_out
-                    #sys.exit()
-                    has_failed = True
-                    m = re.search("Ran ([0-9]+) test", std_out)
-                    if m is not None:
-                        has_failed = False
-                        n_tests += int(m.group(1))
-
-                    m = re.search("FAILED \(errors=([0-9]+)\)", std_out)
-                    if m is not None:
-                        has_failed = True
-                        n_errors += int(m.group(1))
-                    
-                    m = re.search("FAILED \(failures=([0-9]+)\)", std_out)
-                    if m is not None:
-                        has_failed = True
-                        n_failures += int(m.group(1))
-                    
-                    if has_failed:
-                        failed += 1
-                        print "Result for %s (%s): FAILED" % (module_name, module_dir)
-                        print std_out
-                    else:
-                        passed += 1
-                        print "Result for %s: SUCCESS" % module_name
-
-    print "\n----------------------------------------------"
-    if n_tests == 0:
-        print "No tests."
-    else:
-        print "Results by test modules:"
-        print "    PASSED: %d" % passed
-        ratio = 100.0*failed/(failed+passed)
-        print "    FAILED: %d    (%.0f%%)" % (failed,ratio)
-
-        print "Results by tests:"
-        print "    Tests run:    %d" % n_tests
-        print "    Tests failed: %d" % n_failures
-        print "    Test errors:  %d" % n_errors
-    print "----------------------------------------------"
-    
-    return failed
-
-if __name__ == '__main__':
-    all = (len(sys.argv) > 1 and sys.argv[1] == '-all')
-    dirs = sys.argv[1:] if not all else sys.argv[2:]
-    if run_tests(dirs=dirs, all=all)>0:
-        sys.exit(1)
-    
Index: test/utest_sasview.py
===================================================================
--- test/utest_sasview.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
+++ test/utest_sasview.py	(revision 35ec2791ba4240f8154f552ce6ead4e850779a20)
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+import os
+import subprocess
+import re
+import sys
+try:
+    import xmlrunner
+except:
+    print "xmlrunner needs to be installed to run these tests"
+    print "Try easy_install unittest-xml-reporting"
+    sys.exit(1)
+
+# Check whether we have matplotlib installed
+HAS_MPL_WX = True
+try:
+    import matplotlib
+    import wx
+except:
+    HAS_MPL_WX = False
+
+SKIPPED_DIRS = ["sasrealspace", "calculatorview"]
+if not HAS_MPL_WX:
+    SKIPPED_DIRS.append("sasguiframe")
+
+#COMMAND_SEP = ';'
+#if os.name == 'nt':
+#    COMMAND_SEP = '&'
+
+def run_tests(dirs=None, all=False):
+    test_root = os.path.abspath(os.path.dirname(__file__))
+    run_one_py = os.path.join(test_root, 'run_one.py')
+    passed = 0
+    failed = 0
+    n_tests = 0
+    n_errors = 0
+    n_failures = 0
+    
+    for d in (dirs if dirs else os.listdir(test_root)):
+        
+        # Check for modules to be skipped
+        if d in SKIPPED_DIRS:
+            continue
+        
+        # Go through modules looking for unit tests
+        module_dir = os.path.join(test_root, d, "test")
+        if os.path.isdir(module_dir):
+            for f in os.listdir(module_dir):
+                file_path = os.path.join(module_dir,f)
+                if os.path.isfile(file_path) and f.startswith("utest_") and f.endswith(".py"):
+                    module_name,_ = os.path.splitext(f)
+                    code = '"%s" %s %s'%(sys.executable, run_one_py, file_path)
+                    proc = subprocess.Popen(code, shell=True, stdout=subprocess.PIPE, stderr = subprocess.STDOUT)
+                    std_out, std_err = proc.communicate()
+                    #print std_out
+                    #sys.exit()
+                    has_failed = True
+                    m = re.search("Ran ([0-9]+) test", std_out)
+                    if m is not None:
+                        has_failed = False
+                        n_tests += int(m.group(1))
+
+                    m = re.search("FAILED \(errors=([0-9]+)\)", std_out)
+                    if m is not None:
+                        has_failed = True
+                        n_errors += int(m.group(1))
+                    
+                    m = re.search("FAILED \(failures=([0-9]+)\)", std_out)
+                    if m is not None:
+                        has_failed = True
+                        n_failures += int(m.group(1))
+                    
+                    if has_failed:
+                        failed += 1
+                        print "Result for %s (%s): FAILED" % (module_name, module_dir)
+                        print std_out
+                    else:
+                        passed += 1
+                        print "Result for %s: SUCCESS" % module_name
+
+    print "\n----------------------------------------------"
+    if n_tests == 0:
+        print "No tests."
+    else:
+        print "Results by test modules:"
+        print "    PASSED: %d" % passed
+        ratio = 100.0*failed/(failed+passed)
+        print "    FAILED: %d    (%.0f%%)" % (failed,ratio)
+
+        print "Results by tests:"
+        print "    Tests run:    %d" % n_tests
+        print "    Tests failed: %d" % n_failures
+        print "    Test errors:  %d" % n_errors
+    print "----------------------------------------------"
+    
+    return failed
+
+if __name__ == '__main__':
+    all = (len(sys.argv) > 1 and sys.argv[1] == '-all')
+    dirs = sys.argv[1:] if not all else sys.argv[2:]
+    if run_tests(dirs=dirs, all=all)>0:
+        sys.exit(1)
+    
