@@ -0,0 +1,1630 @@
+#!/usr/bin/env python%0A%0A'''%0ACreated on Mar 12, 2012%0A'''%0A%0Afrom __future__ import division%0A%0A__author__=%22Shyue Ping Ong%22%0A__copyright__ = %22Copyright 2012, The Materials Project%22%0A__version__ = %220.1%22%0A__maintainer__ = %22Shyue Ping Ong%22%0A__email__ = %22shyue@mit.edu%22%0A__date__ = %22Mar 12, 2012%22%0A%0Aimport unittest%0Aimport os%0A%0Afrom pymatgen.core.structure import PeriodicSite%0Afrom pymatgen.symmetry.spacegroup import Spacegroup%0Afrom pymatgen.io.vaspio import Poscar%0Afrom pymatgen.symmetry.spglib_adaptor import SymmetryFinder%0A%0Aimport pymatgen%0A%0Atest_dir = os.path.join(os.path.dirname(os.path.abspath(pymatgen.__file__)), '..', 'test_files')%0A%0A%0Aclass SpacegroupTest(unittest.TestCase):%0A%0A    def setUp(self):%0A        p = Poscar.from_file(os.path.join(test_dir, 'POSCAR'))%0A        self.structure = p.struct%0A        self.sg1 = SymmetryFinder(self.structure, 0.001).get_spacegroup()%0A        self.sg2 = Spacegroup.from_spacegroup_number(62)%0A%0A    def test_are_symmetrically_equivalent(self):%0A        sites1 = %5Bself.structure%5Bi%5D for i in %5B0,1%5D%5D%0A        sites2 = %5Bself.structure%5Bi%5D for i in %5B2,3%5D%5D%0A        self.assertTrue(self.sg1.are_symmetrically_equivalent(sites1, sites2, 1e-3))%0A        self.assertTrue(self.sg2.are_symmetrically_equivalent(sites1, sites2, 1e-3))%0A        %0A        sites1 = %5Bself.structure%5Bi%5D for i in %5B0,1%5D%5D%0A        sites2 = %5Bself.structure%5Bi%5D for i in %5B0,2%5D%5D%0A        self.assertFalse(self.sg1.are_symmetrically_equivalent(sites1, sites2, 1e-3))%0A        self.assertFalse(self.sg2.are_symmetrically_equivalent(sites1, sites2, 1e-3))%0A        %0A%0Aif __name__ == %22__main__%22:%0A    #import sys;sys.argv = %5B'', 'Test.testName'%5D%0A    unittest.main()

Add a unittest for spacegroup. Still very basic.