예제 #1
0
    def setUp(self):
        # Setup events for testing
        self.events_mode = event_setup()

        # Get cwd, create and enter scratch dir
        self.cwd = os.getcwd()
        scratch_dir = mkdtemp()
        os.chdir(scratch_dir)
        self.scratch_dir = scratch_dir

        # Set BEEP_PROCESSING_DIR directory to scratch_dir
        os.environ['BEEP_PROCESSING_DIR'] = scratch_dir

        # Create data-share and subfolders
        os.mkdir("data-share")
        os.chdir("data-share")

        # Set up directory structure and specify the test files
        os.mkdir("raw_cycler_files")

        # Copy starting files into raw_cycler_files directory
        starting_files = [
            "2017-12-04_4_65C-69per_6C_CH29.csv",
            "2017-05-09_test-TC-contact_CH33.csv",  # Fails for not meeting naming convention
            "2017-08-14_8C-5per_3_47C_CH44.csv",
            ]
        starting_files = [os.path.join(TEST_FILE_DIR, path)
                          for path in starting_files]
        for file in starting_files:
            shutil.copy(file, "raw_cycler_files")
            shutil.copy(file.replace(".csv", "_Metadata.csv"),
                        "raw_cycler_files")

        # Go back into test directory
        os.chdir('..')
예제 #2
0
    def setUp(self):
        self.events_mode = event_setup()

        self.arbin_file = os.path.join(TEST_FILE_DIR,
                                       "FastCharge_000000_CH29.csv")
        self.maccor_file = os.path.join(TEST_FILE_DIR,
                                        "xTESLADIAG_000019_CH70.070")
        self.maccor_file_w_diagnostics = os.path.join(
            TEST_FILE_DIR, "xTESLADIAG_000020_CH71.071")
        self.maccor_file_w_parameters = os.path.join(
            TEST_FILE_DIR, "PredictionDiagnostics_000109_tztest.010")
        self.pcycler_run_file = os.path.join(
            TEST_FILE_DIR, "2017-12-04_4_65C-69per_6C_CH29_processed.json")
예제 #3
0
 def setUp(self):
     self.events_mode = event_setup()
예제 #4
0
 def setUp(self):
     # Determine events mode for testing
     self.events_mode = event_setup()
예제 #5
0
 def setUp(self):
     self.events_mode = event_setup()
     self.arbin_file = os.path.join(TEST_FILE_DIR,
                                    "2017-12-04_4_65C-69per_6C_CH29.csv")