Changeset 94daf8a in sasview for DataLoader


Ignore:
Timestamp:
Jul 9, 2008 5:26:04 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
8dac49d
Parents:
2fd516b
Message:

one bug fixed on testing

Location:
DataLoader
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/loader.py

    r2fd516b r94daf8a  
    3434                            plugins.append(module.Reader()) 
    3535                        except: 
    36                             logging("Error accessing Reader in %s\n  %s" % (name, sys.exc_value)) 
     36                            logging.error("Error accessing Reader in %s\n  %s" % (name, sys.exc_value)) 
    3737                except : 
    38                     logging("Error importing %s\n  %s" % (name, sys.exc_value)) 
     38                    logging.error("Error importing %s\n  %s" % (name, sys.exc_value)) 
    3939                finally: 
    4040                    if not file==None: 
  • DataLoader/test/testLoad.py

    rd22da51 r94daf8a  
    3434    read5=tiff_reader.Reader() 
    3535    #for each readers set an extensions inside the loader 
    36     L.__setitem__('.txt',read2) 
    37     L.__setitem__('.txt',read1) 
    38     L.__setitem__('.dat',read1) 
     36    L.__setitem__("plugins",'.txt',read2) 
     37    L.__setitem__(None,'.txt',read1) 
     38    L.__setitem__(None,'.dat',read1) 
    3939     
    40     L.__setitem__('.dat',read2) 
    41     L.__setitem__('.ASC',read3) 
    42     L.__setitem__('.sans',read4) 
    43     L.__setitem__('.tif',read5) 
    44     L.__setitem__('.jpg',read5) 
    45     L.__setitem__('.png',read5) 
    46     L.__setitem__('.jpeg',read5) 
    47     L.__setitem__('.gif',read5) 
    48     L.__setitem__('.bmp',read5) 
     40    L.__setitem__(None,'.dat',read2) 
     41    L.__setitem__(None,'.ASC',read3) 
     42    L.__setitem__(None,'.sans',read4) 
     43    L.__setitem__(None,'.tif',read5) 
     44    L.__setitem__(None,'.jpg',read5) 
     45    L.__setitem__(None,'.png',read5) 
     46    L.__setitem__(None,'.jpeg',read5) 
     47    L.__setitem__(None,'.gif',read5) 
     48    L.__setitem__(None,'.bmp',read5) 
    4949        
    5050    def testLoad0(self): 
  • DataLoader/test/testplugings.py

    r2fd516b r94daf8a  
    2222        """ test loading with plugging""" 
    2323        self.L.__setitem__(dir='plugins') 
     24        read3=IgorReader.Reader() 
     25        self.L.__setitem__('plugins','.ASC',read3) 
     26        self.assertEqual(self.L.__contains__('.ASC'),True) 
    2427        #Testing loading a txt file of 2 columns, the only reader should be read1  
    2528        xload,yload,dyload=self.L.load('test_2_columns.txt')  
Note: See TracChangeset for help on using the changeset viewer.