Changeset 8d6440f in sasview for DataLoader/test


Ignore:
Timestamp:
Jul 9, 2008 6:05:49 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:
c45976b
Parents:
8dac49d
Message:

readers printing in a log file text_log.txt now.testload modified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/test/testLoad.py

    r94daf8a r8d6440f  
    104104        data=self.L.load('MP_New.sans') 
    105105         
    106         self.assertEqual(data.__class__,danse_reader.ReaderInfo) 
     106        self.assertEqual(data.wavelength,7.5) 
    107107         
    108108        #tested corrupted file.sans 
     
    112112           logging.error(str(msg)) 
    113113        #else: raise ValueError,"No error raised for missing extension" 
     114         
    114115    def testload5(self): 
    115116        """ Testing loading image file""" 
    116117        data=self.L.load('angles_flat.png') 
    117         self.assertEqual(data.__class__,tiff_reader.ReaderInfo) 
     118        self.assertEqual(data.xbins ,200) 
    118119         
    119120    def testload6(self): 
    120121        """test file with unknown extension""" 
    121122        try:self.L.load('hello.missing') 
    122         except ValueError,msg: 
     123        except RuntimeError,msg: 
    123124           self.assertEqual( str(msg),"Unknown file type '.missing'") 
    124125        else: raise ValueError,"No error raised for missing extension" 
     
    126127        #self.L.lookup('hello.missing') 
    127128        try: self.L.lookup('hello.missing') 
    128         except ValueError,msg: 
     129        except RuntimeError,msg: 
    129130           self.assertEqual( str(msg),"Unknown file type '.missing'") 
    130131        else: raise ValueError,"No error raised for missing extension" 
Note: See TracChangeset for help on using the changeset viewer.