Beispiel #1
0
 def test_known_models(self):
     known_models = models.all_models()
     n = len(known_models)
     for j in range(n):
         for k in range(n):
             self.assertEqual(j == k,
                              known_models[j].equals(known_models[k]))
Beispiel #2
0
 def test_known_models(self):
     # This assumes that every model should be equal to itself and should be
     # different to every other model.
     known_models = models.all_models()
     n = len(known_models)
     for j in range(n):
         for k in range(n):
             self.assertEqual(j == k,
                              known_models[j].equals(known_models[k]))
Beispiel #3
0
 def test_model_generation_time(self):
     self.assertTrue(models.Model().generation_time == -1)
     known_models = models.all_models()
     n = len(known_models)
     for j in range(n):
         self.assertTrue(known_models[j].generation_time > -2)
Beispiel #4
0
 def test_generation_times_non_empty(self):
     self.assertGreater(
         len([model.generation_time for model in models.all_models()]), 0)
Beispiel #5
0
 def test_filtering_outside_classes(self):
     for model in models.all_models():
         self.assertNotIsInstance(model, DummyModel)
Beispiel #6
0
 def test_all_instances(self):
     for model in models.all_models():
         self.assertIsInstance(model, models.Model)
Beispiel #7
0
 def test_non_empty(self):
     self.assertGreater(len(models.all_models()), 0)