예제 #1
0
 def test_ring_pattern_calculation(self):
     tags = ks.example(verbose=False)
     new_tags = ks.ring_pattern_calculation(tags)
     self.assertTrue('{2 6 4}' in new_tags)
     self.assertAlmostEqual(new_tags['{1 1 1}']['reciprocal_distance'],
                            3.369748652857738)
     self.assertAlmostEqual(new_tags['{1 1 1}']['real_distance'],
                            1 / 3.369748652857738)
     self.assertAlmostEqual(new_tags['{1 1 1}']['F'], 17.53103039316424)
     self.assertEqual(new_tags['{1 1 1}']['multiplicity'], 8)
예제 #2
0
    def test_check_sanity(self):
        self.assertFalse(ks.check_sanity({}))

        tags = ks.example(verbose=False)
        self.assertTrue(ks.check_sanity(tags))