# Path: lib/slack/analysis/channel.py
# def conv_len_conv_refr_time(log_dict, nicks, nick_same_list, rt_cutoff_time, cutoff_percentile):
# 	def build_conversation(rec_list, nick, send_time, nick_to_search,
# 						   nick_receiver, nick_sender, dateadd,
# 						   conversations, conn_comp_list, line):
# 	def conv_helper(rec, nick, send_time, nick_to_search, nick_receiver,
# 					nick_sender, dateadd, conversations, conn_comp_list, line):
# 	def conv_mat_diff(i,j,conversations):
# 	def conv_append(conversations, index, dateadd, line):
# 	def parse_log_lines_for_conv(log_dict, nicks, conn_comp_list, conversations):
# def response_time(log_dict, nicks, nick_same_list, cutoff_percentile):
# 	def build_mean_list(conversations, index, mean_list):
# 	def resp_helper(rec, nick, send_time, nick_to_search, nick_receiver, nick_sender, conversations, conn_comp_list):
# def build_stat_dist(number_list):
# def truncate_table(table, cutoff_percentile):
# 	G = util.to_graph(nick_same_list)
# 	G = util.to_graph(nick_same_list)


import unittest
import sys
import os
import lib.slack.util as util
from lib.slack.analysis import channel
sys.path.insert(0,'../../../../')

 
class ChannelTest(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 = util.load_from_disk(self.current_directory + "/data/nicks")
        self.nick_same_list = util.load_from_disk(self.current_directory + "/data/nick_same_list")

    def tearDown(self):
        self.current_directory = None
        self.log_data = None
        self.nicks = None
        self.nick_same_list = None

    def test_conv_len_conv_refr_time(self):
        rt_cutoff_time = 1
        cutoff_percentile = 0
        expected_conv_len = util.load_from_disk(self.current_directory + "/data/conv_len")
        expected_conv_ref_time = util.load_from_disk(self.current_directory + "/data/conv_ref_time")

        conv_len, conv_ref_time = \

# Path: lib/slack/analysis/channel.py
# def conv_len_conv_refr_time(log_dict, nicks, nick_same_list, rt_cutoff_time, cutoff_percentile):
# 	def build_conversation(rec_list, nick, send_time, nick_to_search,
# 						   nick_receiver, nick_sender, dateadd,
# 						   conversations, conn_comp_list, line):
# 	def conv_helper(rec, nick, send_time, nick_to_search, nick_receiver,
# 					nick_sender, dateadd, conversations, conn_comp_list, line):
# 	def conv_mat_diff(i,j,conversations):
# 	def conv_append(conversations, index, dateadd, line):
# 	def parse_log_lines_for_conv(log_dict, nicks, conn_comp_list, conversations):
# def response_time(log_dict, nicks, nick_same_list, cutoff_percentile):
# 	def build_mean_list(conversations, index, mean_list):
# 	def resp_helper(rec, nick, send_time, nick_to_search, nick_receiver, nick_sender, conversations, conn_comp_list):
# def build_stat_dist(number_list):
# def truncate_table(table, cutoff_percentile):
# 	G = util.to_graph(nick_same_list)
# 	G = util.to_graph(nick_same_list)


# Path: test/unit-test/test_slack/test_lib/test_analysis/test_channel.py
import unittest
import sys
import os
import lib.slack.util as util
from lib.slack.analysis import channel

sys.path.insert(0,'../../../../')

 
class ChannelTest(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 = util.load_from_disk(self.current_directory + "/data/nicks")
        self.nick_same_list = util.load_from_disk(self.current_directory + "/data/nick_same_list")

    def tearDown(self):
        self.current_directory = None
        self.log_data = None
        self.nicks = None
        self.nick_same_list = None

    def test_conv_len_conv_refr_time(self):
        rt_cutoff_time = 1
        cutoff_percentile = 0
        expected_conv_len = util.load_from_disk(self.current_directory + "/data/conv_len")
        expected_conv_ref_time = util.load_from_disk(self.current_directory + "/data/conv_ref_time")

        conv_len, conv_ref_time = \

            channel.conv_len_conv_refr_time(self.log_data, self.nicks, self.nick_same_list,