Changeset fa749b7 in sasview for test/sasdataloader


Ignore:
Timestamp:
Dec 21, 2017 7:27:49 AM (7 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b6b81a3
Parents:
e3775c6
Message:

Add USANS files (.abs and .cor) with negative dxl values and unit tests for loading them.

Location:
test/sasdataloader/test
Files:
2 added
1 edited

Legend:

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

    rf53d684 rfa749b7  
    7575        data = Loader().load(find("jan08002.ABS")) 
    7676        self.assertEqual(data[0].meta_data['loader'], "IGOR 1D") 
     77 
     78    def test_usans_negative_dxl(self): 
     79        data_abs = Loader().load(find("sam14_cor.ABS")) 
     80        data_cor = Loader().load(find("sam14_cor.cor")) 
     81        for i in range(0, len(data_abs) - 1): 
     82            self.assertEquals(data_abs.x[i], data_cor.x[i]) 
     83            self.assertEquals(data_abs.y[i], data_cor.y[i]) 
     84            self.assertEquals(data_abs.dxl[i], data_cor.dxl[i]) 
     85            self.assertEquals(data_abs.dxw[i], data_cor.dxw[i]) 
     86            self.assertTrue(data_abs.dxl > 0) 
     87 
    7788 
    7889class DanseReaderTests(unittest.TestCase): 
Note: See TracChangeset for help on using the changeset viewer.