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