Beispiel #1
0
    def test_repr(self):
        sublattice = Sublattice(self.peaks, self.s)
        sublattice.name = 'test planes'
        sublattice.construct_zone_axes()

        repr_str = '<Sublattice, test planes (atoms:%s,planes:%s)>' % (len(
            sublattice.atom_list), len(sublattice.atom_planes_by_zone_vector))
        assert sublattice.__repr__() == repr_str
Beispiel #2
0
 def test_repr_no_planes(self):
     sublattice = Sublattice(self.peaks, self.image_data)
     sublattice.name = 'test'
     repr_str = '<Sublattice, test (atoms:%s,planes:0)>' % (self.atoms_N)
     assert sublattice.__repr__() == repr_str