# Path: lib/analysis/community.py
# def infomap_igraph(ig_graph, net_file_location=None):


import unittest
import lib.util as util
import os
from lib.analysis import community
from igraph import clustering,Graph


class CommunityTest(unittest.TestCase):

    def setUp(self):
        self.current_directory = os.path.dirname(os.path.realpath(__file__))
        self.log_data = util.load_from_disk(self.current_directory+ "/data/log_data")
        self.nicks_hash = util.load_from_disk(self.current_directory+ "/data/nicks_hash")
        self.sample_igraph = Graph()
        self.sample_igraph.add_vertices(8)

    def tearDown(self):
        self.current_directory = None
        self.log_data = None
        self.nicks_hash = None
        self.sample_igraph = None

    def test_infomap_igraph(self):

# Path: lib/analysis/community.py
# def infomap_igraph(ig_graph, net_file_location=None):


# Path: test/unit-test/test_lib/test_analysis/test_community.py
import unittest
import lib.util as util
import os
from lib.analysis import community
from igraph import clustering,Graph



class CommunityTest(unittest.TestCase):

    def setUp(self):
        self.current_directory = os.path.dirname(os.path.realpath(__file__))
        self.log_data = util.load_from_disk(self.current_directory+ "/data/log_data")
        self.nicks_hash = util.load_from_disk(self.current_directory+ "/data/nicks_hash")
        self.sample_igraph = Graph()
        self.sample_igraph.add_vertices(8)

    def tearDown(self):
        self.current_directory = None
        self.log_data = None
        self.nicks_hash = None
        self.sample_igraph = None

    def test_infomap_igraph(self):

        message_graph, message_comm = community.infomap_igraph(ig_graph=None, net_file_location= self.current_directory + '/data/message_number_graph.net')