Ignore:
Timestamp:
Sep 17, 2018 2:44:32 PM (6 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, unittest-saveload
Children:
926ece5
Parents:
a78446ce
Message:

Change unit tests from assertTrue( == ) to assertEqual and change file path separators to os.sep for platform independence.

File:
1 edited

Legend:

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

    rf53d684 rf4e2f22  
    2525            Test .SES in the full loader to make sure that the file type is correctly accepted 
    2626        """ 
    27         file = Loader().load(find("sesans_examples/sphere2micron.ses")) 
     27        file = Loader().load(find("sesans_examples" + os.sep + 
     28                                  "sphere2micron.ses")) 
    2829        f = file[0] 
    2930        # self.assertEqual(f, 5) 
     
    4445            Test .SES loading on a TOF dataset 
    4546        """ 
    46         file = self.loader(find("sesans_examples/sphere_isis.ses")) 
     47        file = self.loader(find("sesans_examples" + os.sep + "sphere_isis.ses")) 
    4748        f = file[0] 
    4849        self.assertEqual(len(file), 1) 
     
    6263            FileContentsException, 
    6364            self.loader, 
    64             find("sesans_examples/sesans_no_data.ses")) 
     65            find("sesans_examples" + os.sep + "sesans_no_data.ses")) 
    6566 
    6667    def test_sesans_no_spin_echo_unit(self): 
     
    7172            FileContentsException, 
    7273            self.loader, 
    73             find("sesans_examples/no_spin_echo_unit.ses")) 
     74            find("sesans_examples" + os.sep + "no_spin_echo_unit.ses")) 
    7475 
    7576    def test_sesans_future_version(self): 
     
    8081            FileContentsException, 
    8182            self.loader, 
    82             find("sesans_examples/next_gen.ses")) 
     83            find("sesans_examples" + os.sep + "next_gen.ses")) 
    8384 
    8485    def test_sesans_mandatory_headers(self): 
     
    8990            FileContentsException, 
    9091            self.loader, 
    91             find("sesans_examples/no_wavelength.ses")) 
     92            find("sesans_examples" + os.sep + "no_wavelength.ses")) 
    9293 
    9394    def test_sesans_columns_match_headers(self): 
     
    9899            FileContentsException, 
    99100            self.loader, 
    100             find("sesans_examples/too_many_headers.ses")) 
     101            find("sesans_examples" + os.sep + "too_many_headers.ses")) 
    101102 
    102103if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.