Пример #1
0
    def test_1(self):
        
        objectname = "test_class"
        data_folder = "/User/Robbert/Bla"
        date = "20010101"
        basename = "foo"
        timestamp = "123456"
        MacOSX = True
        
        x = PC.pe_col(objectname, flag_verbose = self.flag_verbose)

        x.set_file_dict(data_folder, date, basename, timestamp)
        
        self.assertEqual(x.file_dict["base_filename"], "/User/Robbert/Bla/20010101/foo_123456/foo_123456")
Пример #2
0
    def setUp(self):
        self.flag_verbose = args.verbose  
        
        self.file_dict_A = {
            "data_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources",
            "date": "20010101",
            "basename": "A",
            "timestamp": "123456",
            "extension": ".csv",
            "base_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/A_123456/",
            "base_filename": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/A_123456/A_123456", 
        }  
        objectname = "test A"   
        self.A = PC.pe_col(objectname, flag_verbose = self.flag_verbose)
        self.A.set_file_dict(self.file_dict_A["data_folder"], self.file_dict_A["date"], self.file_dict_A["basename"], self.file_dict_A["timestamp"])

        self.file_dict_B = {
            "data_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources",
            "date": "20010101",
            "basename": "B",
            "timestamp": "234506",
            "extension": ".csv",
            "base_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/B_234506/",
            "base_filename": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/B_234506/B_234506", 
        }       
        objectname = "test B"      
        self.B = PC.pe_col(objectname, flag_verbose = self.flag_verbose)
        self.B.set_file_dict(self.file_dict_B["data_folder"], self.file_dict_B["date"], self.file_dict_B["basename"], self.file_dict_B["timestamp"])

        self.file_dict_C = {
            "data_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources",
            "date": "20010101",
            "basename": "azide",
            "timestamp": "174608",
            "extension": ".csv",
            "base_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_174608",
            "base_filename": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_174608/azide_174608", 
        }       
        objectname = "test C"      
        self.C = PC.pe_col(objectname, flag_verbose = self.flag_verbose)
        self.C.set_file_dict(self.file_dict_C["data_folder"], self.file_dict_C["date"], self.file_dict_C["basename"], self.file_dict_C["timestamp"])

        self.file_dict_D= {
            "data_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources",
            "date": "20010101",
            "basename": "azide_intensity",
            "timestamp": "175321",
            "extension": ".csv",
            "base_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_intensity_175321",
            "base_filename": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_intensity_175321/azide_intensity_175321", 
        }       
        objectname = "test D"      
        self.D = PC.pe_col(objectname, flag_verbose = self.flag_verbose)
        self.D.set_file_dict(self.file_dict_D["data_folder"], self.file_dict_D["date"], self.file_dict_D["basename"], self.file_dict_D["timestamp"])

        self.file_dict_E= {
            "data_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources",
            "date": "20010101",
            "basename": "azide_chopper",
            "timestamp": "111833",
            "extension": ".csv",
            "base_folder": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_chopper_111833",
            "base_filename": "/Users/robbert/Developer/Crocodile/Tests/Test_resources/20010101/azide_chopper_111833/azide_chopper_111833", 
        }       
        objectname = "test E"      
        self.E= PC.pe_col(objectname, flag_verbose = self.flag_verbose)
        self.E.set_file_dict(self.file_dict_E["data_folder"], self.file_dict_E["date"], self.file_dict_E["basename"], self.file_dict_E["timestamp"])