Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #5
0
from analyser import dig_web
from clusters import merge_clusters

mc = merge_clusters(dig_web(), 2)