Beispiel #1
0
 def test_init_lattice_str(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR,
                filename=FILENAME,
                savedir=SAVEDIR,
                lattice=str(3.912))
Beispiel #2
0
 def setUp(self):
     # executed before each test
     self.facets = Facets(pathdir=THIS_DIR,
                          filename=FILENAME,
                          savedir=SAVEDIR)
Beispiel #3
0
 def test_init_filename_wrong_type(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR, filename=0, savedir=SAVEDIR)
Beispiel #4
0
 def test_init_lattice_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR,
                filename=FILENAME,
                savedir=SAVEDIR,
                lattice=None)
Beispiel #5
0
 def test_init_filename_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR, filename=None, savedir=SAVEDIR)
Beispiel #6
0
 def test_init_savedir_wrong_type(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR, filename=FILENAME, savedir=0)
Beispiel #7
0
 def test_init_savedir_none(self):
     facets = Facets(pathdir=THIS_DIR, filename=FILENAME, savedir=None)
     self.assertTrue(facets.pathsave == THIS_DIR + "/facets_analysis/")
Beispiel #8
0
 def test_init_savedir_empty(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR, filename=FILENAME, savedir="")
Beispiel #9
0
 def test_init_pathdir_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=None, filename=FILENAME, savedir=SAVEDIR)