Changeset ce8c7bd in sasview for test


Ignore:
Timestamp:
Aug 4, 2017 4:56:58 AM (7 years ago)
Author:
lewis
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
44daa56
Parents:
4dd90bf
Message:

Remove support for loading .d1d files

HFIR no longer use the .d1d format, so there's no need to support it
anymore.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/sasdataloader/test/utest_abs_reader.py

    r4dd90bf rce8c7bd  
    88from sas.sascalc.dataloader.loader import Loader 
    99from sas.sascalc.dataloader.readers.abs_reader import Reader as AbsReader 
    10 from sas.sascalc.dataloader.readers.hfir1d_reader import Reader as HFIRReader 
    1110from sas.sascalc.dataloader.readers.danse_reader import Reader as DANSEReader 
    1211from sas.sascalc.dataloader.readers.cansas_reader import Reader as CANSASReader 
     
    7170        data = Loader().load("jan08002.ABS") 
    7271        self.assertEqual(data.meta_data['loader'], "IGOR 1D") 
    73  
    74  
    75 class hfir_reader(unittest.TestCase): 
    76  
    77     def setUp(self): 
    78         reader = HFIRReader() 
    79         self.data = reader.read("S2-30dq.d1d") 
    80  
    81     def test_hfir_checkdata(self): 
    82         """ 
    83             Check the data content to see whether 
    84             it matches the specific file we loaded. 
    85         """ 
    86         self.assertEqual(self.data.filename, "S2-30dq.d1d") 
    87         # THIS FILE FORMAT IS CURRENTLY READ BY THE ASCII READER 
    88         self.assertEqual(self.data.meta_data['loader'], "HFIR 1D") 
    89         self.assertEqual(len(self.data.x), 134) 
    90         self.assertEqual(len(self.data.y), 134) 
    91         #          Q           I               dI          dQ 
    92         # Point 1: 0.003014    0.003010        0.000315    0.008249 
    93         self.assertEqual(self.data.x[1], 0.003014) 
    94         self.assertEqual(self.data.y[1], 0.003010) 
    95         self.assertEqual(self.data.dy[1], 0.000315) 
    96         self.assertEqual(self.data.dx[1], 0.008249) 
    97  
    98     def test_generic_loader(self): 
    99         # the generic loader should work as well 
    100         data = Loader().load("S2-30dq.d1d") 
    101         self.assertEqual(data.meta_data['loader'], "HFIR 1D") 
    10272 
    10373class DanseReaderTests(unittest.TestCase): 
Note: See TracChangeset for help on using the changeset viewer.