def test_shape(self): cell = UnitCell(3, 4, 5) self.assertEqual(cell.shape, CellShape.Orthorhombic) cell.shape = CellShape.Triclinic self.assertEqual(cell.shape, CellShape.Triclinic) cell = UnitCell(3, 4, 5, 100, 120, 130) self.assertEqual(cell.shape, CellShape.Triclinic)
def test_angles(self): cell = UnitCell(3, 4, 5) self.assertEqual(cell.angles, (90.0, 90.0, 90.0)) self.assertEqual(cell.shape, CellShape.Orthorhombic) with remove_warnings: with self.assertRaises(ChemfilesError): cell.angles = [80, 89, 110] cell.shape = CellShape.Triclinic cell.angles = [80, 89, 110] self.assertEqual(cell.angles, (80.0, 89.0, 110.0))