Ejemplo n.º 1
0
 def test_instantiation_fail_dne(self):
     failed = False
     try:
         _ = FileCodeDriver(filepath="nonexistant_path")
     except PathDoesNotExist:
         failed = True
     assert failed
Ejemplo n.º 2
0
 def setup_method(self):
     # provide mountable tmp directory for docker
     tempfile.tempdir = "/tmp" if not platform.system(
     ) == "Windows" else None
     test_datmo_dir = os.environ.get('TEST_DATMO_DIR',
                                     tempfile.gettempdir())
     self.temp_dir = tempfile.mkdtemp(dir=test_datmo_dir)
     self.file_code_manager = FileCodeDriver(filepath=self.temp_dir)
Ejemplo n.º 3
0
 def test_instantiation_fail_dne(self):
     failed = False
     try:
         _ = FileCodeDriver(
             root="nonexistant_path", datmo_directory_name=".datmo")
     except PathDoesNotExist:
         failed = True
     assert failed
Ejemplo n.º 4
0
 def test_init_then_instantiation(self):
     self.file_code_manager.init()
     another_file_code_manager = FileCodeDriver(filepath=self.temp_dir)
     result = another_file_code_manager.is_initialized
     assert result == True
Ejemplo n.º 5
0
 def test_init_then_instantiation(self):
     self.file_code_driver.init()
     another_file_code_manager = FileCodeDriver(
         root=self.temp_dir, datmo_directory_name=".datmo")
     result = another_file_code_manager.is_initialized
     assert result == True