def test_main_fun_path():
    """
    Function tests file's path which created by main_fun function.
    """
    from soft4recieve_write_Rel2.main_lib import user_group_name2str

    # Get dictionary of binary files
    sfd = sort_file_dict(test_path['common'])
    # Get full first file's name
    fff_name = sfd[sorted(sfd)[0]]
    print "First file's name: \n", fff_name
    print
    print "Date and time: ", date_from_bin_file(fff_name)
    # Get list of available data
    new_packets = get_available_data(sfd)
    # Get group's names of available data
    group_data = user_group_name2str(new_packets)
    print 'Group\'s names of available data: \n', group_data
    local_path = fun_path['main_fun']
    path = local_path(group_data,date_from_bin_file(fff_name))

    print 'main_fun path file: \n', path, '\n'
Esempio n. 2
0
def test_main_fun_path():
    """
    Function tests file's path which created by main_fun function.
    """
    from soft4recieve_write_Rel2.main_lib import user_group_name2str

    # Get dictionary of binary files
    sfd = sort_file_dict(test_path['common'])
    # Get full first file's name
    fff_name = sfd[sorted(sfd)[0]]
    print "First file's name: \n", fff_name
    print
    print "Date and time: ", date_from_bin_file(fff_name)
    # Get list of available data
    new_packets = get_available_data(sfd)
    # Get group's names of available data
    group_data = user_group_name2str(new_packets)
    print 'Group\'s names of available data: \n', group_data
    local_path = fun_path['main_fun']
    path = local_path(group_data, date_from_bin_file(fff_name))

    print 'main_fun path file: \n', path, '\n'
    print 'Test main3 func\n=================='
    # Create dict of named arguments
    func_pool2 = (test4,test5,test6)
#    kargs = {'arg1':'1','arg2':'2','arg3':'3'}
    kargs = {'arg1':None,'arg2':None,'arg3':None}
#    main3(func_pool2,kargs)
    print '==================\n'

    # Get dictionary of binary files
    sfd = sort_file_dict(test_path['common'])
    # Get full first file's name
    fff_name = sfd[sorted(sfd)[0]]
    # Get list of available data
    new_packets = get_available_data(sfd)
    # Get group's names of available data
    group_data = user_group_name2str(new_packets)
    print 'Group\'s names of available data: \n', group_data
    local_path = fun_path['main_fun']
    path = local_path(group_data,date_from_bin_file(fff_name))



    print "=================================================="
#    print (test3.__code__.co_varnames)
#    print 'Attribute test'
#    test1('3')
#    print  dir(test1)
#    print test1.__dict __
#    help(test1.func_dict)
#    test1.my_file_name = 'test.dat'
#    test1.__setattr__('my_file_name','test\\test.dat')
Esempio n. 4
0
    print 'Test main3 func\n=================='
    # Create dict of named arguments
    func_pool2 = (test4, test5, test6)
    #    kargs = {'arg1':'1','arg2':'2','arg3':'3'}
    kargs = {'arg1': None, 'arg2': None, 'arg3': None}
    #    main3(func_pool2,kargs)
    print '==================\n'

    # Get dictionary of binary files
    sfd = sort_file_dict(test_path['common'])
    # Get full first file's name
    fff_name = sfd[sorted(sfd)[0]]
    # Get list of available data
    new_packets = get_available_data(sfd)
    # Get group's names of available data
    group_data = user_group_name2str(new_packets)
    print 'Group\'s names of available data: \n', group_data
    local_path = fun_path['main_fun']
    path = local_path(group_data, date_from_bin_file(fff_name))

    print "=================================================="
#    print (test3.__code__.co_varnames)
#    print 'Attribute test'
#    test1('3')
#    print  dir(test1)
#    print test1.__dict __
#    help(test1.func_dict)
#    test1.my_file_name = 'test.dat'
#    test1.__setattr__('my_file_name','test\\test.dat')
#    print dir(test1)
#    print test1.my_file_name