Exemple #1
0
    def test_size_empty_cluster(self):
        """
        Test that the size of an empty cluster is 0.
        """

        c = Cluster()
        self.assertEqual(0, c.size())
Exemple #2
0
    def test_size(self):
        """
        Test retrieving the size of a cluster.
        """

        v = [
            Document("", ['a', 'b'], scheme=TF()),
            Document("", ['a', 'a'], scheme=TF()),
        ]
        c = Cluster(v)
        self.assertEqual(len(v), c.size())