Ejemplo n.º 1
0
    def test_import_non_existent_experiment(self):
        mlc = MLCLocal(working_dir=MLCWorkspaceTest.WORKSPACE_DIR)

        import_experiment_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                              "test4.mlc")
        mlc.import_experiment(import_experiment_path)
        self.assertTrue("test4" in mlc.get_workspace_experiments())
        mlc.delete_experiment("test4")
Ejemplo n.º 2
0
 def test_import_experiment_with_erroneous_path(self):
     mlc = MLCLocal(working_dir=MLCWorkspaceTest.WORKSPACE_DIR)
     import_experiment_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
                                           "test5.mlc")
     try:
         mlc.import_experiment(import_experiment_path)
         self.assertTrue(False)
         mlc.delete_experiment("test5")
     except MLC.api.mlc.ImportExperimentPathNotExistException:
         self.assertTrue(True)
         self.assertFalse("test5" in mlc.get_workspace_experiments())
Ejemplo n.º 3
0
 def test_obtain_experiments(self):
     mlc = MLCLocal(working_dir=MLCWorkspaceTest.WORKSPACE_DIR)
     experiments = mlc.get_workspace_experiments()
     self.assertEqual(len(experiments), 1)
     self.assertEqual(experiments[0], MLCWorkspaceTest.ORIGINAL_EXPERIMENT)