Пример #1
0
 def test_90Sr(self):
     results = [list(self.model(r)) for r in parse_spec('90Sr')]
     self.assertEqual([
         [((90, 37), (0, 0), (0, -1)),
          ((90, 39), (0, 0), (0, -1)),
          ((90, 40), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((89, 37), (1, 1)),
          ((86, 36), (4, 2), (0, -1))]]
     , results)
Пример #2
0
 def test_t(self):
     results = [list(self.model(r)) for r in parse_spec('t')]
     self.assertEqual([
         [((1, 0), (1, 0), (1, 0), (0, 0), (0, -1)),
          ((3, 2), (0, 0), (0, -1)),
          ((1, 1), (1, 1), (1, 1), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((1, 0), (1, 0), (1, 1)),
          ((-1, -1), (4, 2), (0, -1))]]
     , results)
Пример #3
0
 def test_p(self):
     results = [list(self.model(r)) for r in parse_spec('p')]
     self.assertEqual([
         [((1, 0), (0, 0), (0, -1)),
          ((1, 2), (0, 0), (0, -1)),
          ((1, 3), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((1, 1),),
          ((-3, -1), (4, 2), (0, -1))]]
     , results)
Пример #4
0
 def test_n(self):
     # Will fail at a later stage
     results = [list(self.model(r)) for r in parse_spec('n')]
     self.assertEqual([
         [((1, -1), (0, 0), (0, -1)),
          ((1, 1), (0, 0), (0, -1)),
          ((1, 2), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((0, -1), (1, 1)),
          ((-3, -2), (4, 2), (0, -1))]]
     , results)
Пример #5
0
 def test_Li(self):
     results = [list(self.model(r)) for r in parse_spec('Li')]
     self.assertEqual([
         [((6, 2), (0, 0), (0, -1)),
          ((6, 4), (0, 0), (0, -1)),
          ((6, 5), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((5, 2), (1, 1)),
          ((2, 1), (4, 2), (0, -1))],
         [((7, 2), (0, 0), (0, -1)),
          ((7, 4), (0, 0), (0, -1)),
          ((7, 5), (0, 0), (0, 0), (0, -1), (0, -1)),
          ((6, 2), (1, 1)),
          ((3, 1), (4, 2), (0, -1))]]
     , results)
Пример #6
0
 def test_outcomes(self):
     reactants = list(parse_spec('p+7Li'))[0]
     outcomes = list(StandardModel()(reactants))
     self.assertEqual(42, len(outcomes))
     self.assertEqual(((8, 4),), outcomes[0])
Пример #7
0
 def test_d_3He(self):
     reactants = list(parse_spec('d+3He'))[0]
     self.assertEqual([
         ((1, 1), (1, 1), (3, 1)),
         ((1, 0), (1, 0), (1, 1), (1, 1), (1, 1)),
     ], list(self.model(reactants)))
Пример #8
0
 def test_p_d(self):
     reactants = list(parse_spec('p+d'))[0]
     self.assertEqual(
         [((1, 0), (1, 0), (1, 2)),
          ((1, 0), (1, 1), (1, 1)),
     ], list(self.model(reactants)))
Пример #9
0
 def test_p_d(self):
     reactants = list(parse_spec('p+d'))[0]
     self.assertEqual([], list(self.model(reactants)))