Ejemplo n.º 1
0
 def test_init_lattice_str(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR,
                filename=FILENAME,
                savedir=SAVEDIR,
                lattice=str(3.912))
Ejemplo n.º 2
0
 def setUp(self):
     # executed before each test
     self.facets = Facets(pathdir=THIS_DIR,
                          filename=FILENAME,
                          savedir=SAVEDIR)
Ejemplo n.º 3
0
 def test_init_filename_wrong_type(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR, filename=0, savedir=SAVEDIR)
Ejemplo n.º 4
0
 def test_init_lattice_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR,
                filename=FILENAME,
                savedir=SAVEDIR,
                lattice=None)
Ejemplo n.º 5
0
 def test_init_filename_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR, filename=None, savedir=SAVEDIR)
Ejemplo n.º 6
0
 def test_init_savedir_wrong_type(self):
     with self.assertRaises(TypeError):
         Facets(pathdir=THIS_DIR, filename=FILENAME, savedir=0)
Ejemplo n.º 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/")
Ejemplo n.º 8
0
 def test_init_savedir_empty(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=THIS_DIR, filename=FILENAME, savedir="")
Ejemplo n.º 9
0
 def test_init_pathdir_none(self):
     with self.assertRaises(ValueError):
         Facets(pathdir=None, filename=FILENAME, savedir=SAVEDIR)