Пример #1
0
 def test_can_get_best_assembly(self):
     f = File()
     f._assemblies = [{
         "delta_energy": -20,
         "id": 1,
     }, {
         "delta_energy": -60,
         "id": 2
     }, {
         "delta_energy": -7,
         "id": 3
     }, {
         "delta_energy": None,
         "id": 4
     }]
     model = f.best_assembly
     self.assertEqual(model, {"delta_energy": -60, "id": 2})
Пример #2
0
 def test_can_get_assemblies(self):
     file_ = File()
     file_._assemblies = ["1", "2"]
     self.assertIs(file_._assemblies, file_.assemblies)