Exemple #1
0
    def test_php_clustering(self):
        clusters = merge_clusters(ctxs, 1)
        cluster = Cluster(set(["php"]))
        for c in clusters:
            if c == cluster:
                break
        else:
            self.fail("Cluster not found!")

        self.assertEquals(len(c), 2, c.contextables)
Exemple #2
0
    def test_brhackday_eventomeeter_clustering(self):
        clusters = merge_clusters(ctxs, 2)
        cluster = Cluster(set(["brhackday", "eventomeeter"]))
        for c in clusters:
            if c == cluster:
                break
        else:
            self.fail("Cluster not found!")

        self.assertEquals(len(c), 27, c.contextables)
Exemple #3
0
    def test_php_ruby_clustering(self):
        clusters = merge_clusters(ctxs, 2)
        cluster = Cluster(set(["php", "ruby"]))
        for c in clusters:
            if c == cluster:
                break
        else:
            self.fail("Cluster not found!")

        self.assertEquals(len(c), 3)
Exemple #4
0
    def test_brhackday_senac_python_clustering(self):
        clusters = merge_clusters(ctxs, 3)
        cluster = Cluster(set(["brhackday", "senac", "python"]))
        for c in clusters:
            if c == cluster:
                break
        else:
            self.fail("Cluster not found!")

        self.assertEquals(len(c), 8)
Exemple #5
0
from analyser import dig_web
from clusters import merge_clusters

mc = merge_clusters(dig_web(), 2)