Ejemplo n.º 1
0
 def tearDownClass(cls):
     project = Project(
         os.path.join(os.path.dirname(os.path.abspath(__file__)),
                      "hdf5_content"))
     ham = project.load(project.get_job_ids()[0])
     ham.remove()
     project.remove(enable=True)
Ejemplo n.º 2
0
 def tearDownClass(cls):
     project = Project(
         os.path.join(os.path.dirname(os.path.abspath(__file__)),
                      "random_testing"))
     job = project.load(project.get_job_ids()[0])
     job.remove()
     project.remove(enable=True)
Ejemplo n.º 3
0
 def tearDownClass(cls):
     # print('tear down')
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(
         os.path.join(file_location, 'random_testing_non_modal'))
     project.remove_jobs()
     project.remove(enable=True)
Ejemplo n.º 4
0
class TestProject(unittest.TestCase):
    def setUp(self):
        self.current_dir = os.path.dirname(os.path.abspath(__file__)).replace('\\', '/')
        self.project = Project(os.path.join(self.current_dir, 'sub_folder'))

    def tearDown(self):
        self.project.remove(enable=True)

    def test_repr(self):
        self.assertEqual([], self.project.list_groups())
        pr_down_one = self.project['..']
        pr_down_two = self.project['../..']
        pr_down_twice = self.project['..']['..']
        self.assertEqual(pr_down_two.__repr__(), pr_down_twice.__repr__())
        self.assertEqual(sorted([directory for directory in os.listdir(self.current_dir)
                                 if not os.path.isfile(os.path.join(self.current_dir, directory))]),
                         pr_down_one.list_groups())
        self.assertEqual(sorted([directory for directory in os.listdir(os.path.join(self.current_dir, '..'))
                                 if not os.path.isfile(os.path.join(self.current_dir, '..', directory))]),
                         pr_down_two.list_groups())
        self.assertEqual(pr_down_two.list_groups(), pr_down_twice.list_groups())
Ejemplo n.º 5
0
 def tearDownClass(cls):
     cls.execution_path = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(cls.execution_path, 'lammps'))
     project.remove_jobs(recursive=True)
     project.remove(enable=True)
Ejemplo n.º 6
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, "test_genericjob"))
     project.remove(enable=True)
Ejemplo n.º 7
0
 def tearDownClass(cls):
     cls.job.interactive_close()
     project = Project(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'random_testing_atomistic'))
     job = project.load(project.get_job_ids()[0])
     job.remove()
     project.remove(enable=True)
Ejemplo n.º 8
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, 'jobs_testing'))
     project.remove(enforce=True)
Ejemplo n.º 9
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, "random_testing_lib"))
     ham = project.load(project.get_job_ids()[0])
     ham.remove()
     project.remove(enable=True)
Ejemplo n.º 10
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, 'testing_serial'))
     project.remove(enable=True)
Ejemplo n.º 11
0
 def tearDownClass(cls):
     cls.file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(cls.file_location, 'test_murnaghan'))
     project.remove(enable=True, enforce=True)
Ejemplo n.º 12
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, "testing_childids"))
     project.remove_jobs(recursive=True)
     project.remove(enable=True)
Ejemplo n.º 13
0
 def tearDownClass(cls):
     file_location = os.path.dirname(os.path.abspath(__file__))
     project = Project(os.path.join(file_location, "testing_murnaghan_master_modal"))
     project.remove_jobs(recursive=True)
     project.remove(enable=True, enforce=True)