Beispiel #1
0
 def test_countAndLen(self):
     """
     Tests the count and __len__ methods of the Catalog object.
     """
     # empty catalog without events
     catalog = Catalog()
     self.assertEqual(len(catalog), 0)
     self.assertEqual(catalog.count(), 0)
     # catalog with events
     catalog = read_events()
     self.assertEqual(len(catalog), 3)
     self.assertEqual(catalog.count(), 3)
Beispiel #2
0
 def test_countAndLen(self):
     """
     Tests the count and __len__ methods of the Catalog object.
     """
     # empty catalog without events
     catalog = Catalog()
     self.assertEqual(len(catalog), 0)
     self.assertEqual(catalog.count(), 0)
     # catalog with events
     catalog = read_events()
     self.assertEqual(len(catalog), 3)
     self.assertEqual(catalog.count(), 3)
Beispiel #3
0
 def test_count_and_len(self):
     """
     Tests the count and __len__ methods of the Catalog object.
     """
     # empty catalog without events
     catalog = Catalog()
     assert len(catalog) == 0
     assert catalog.count() == 0
     # catalog with events
     catalog = read_events()
     assert len(catalog) == 3
     assert catalog.count() == 3