# Path: mpinterfaces/transformations.py
# def get_trans_matrices(n):
#     """
#     Returns a list of 2x2 transformation matrices for the
#     given supercell
# 
#     n: size of the supercell (area wise only)
#     """
# 
#     factors = []
#     for i in range(1, n + 1):
#         if n % i == 0:
#             factors.append(i)
# 
#     trans_matrices = []
#     for i in factors:
#         m = n // i
#         tm = [[[i, j], [0, m]] for j in range(m)]
#         trans_matrices.append(tm)
#     all_tm = []
#     for i in range(0, len(trans_matrices)):
#         each_set = trans_matrices[i]
#         for j in range(0,len(each_set)):
#             all_tm.append(each_set[j])
#     return all_tm


import unittest
from mpinterfaces.transformations import get_trans_matrices

    for i in generated_list:
        for j in i:
            generated_list_2.append(j)

    return generated_list_2

def get_divisors_sum(number):
    """
    Gives the sum of divisors of a number = S
    According to the Zur algorithm, S should be equal to total number of
    trans_matrices
    """
    if number == 0:
        return 0

    divisors_list = []
    for i in range(number+1):
        j = i + 1
        if number % j == 0:
            divisors_list.append(j)

    return sum(divisors_list)


class TestGetTransMatrices(unittest.TestCase):
    """ Test get_trans_matrices  """

    def test_0(self):
        self.assertEqual([], get_trans_matrices(0))

# Path: mpinterfaces/transformations.py
# def get_trans_matrices(n):
#     """
#     Returns a list of 2x2 transformation matrices for the
#     given supercell
# 
#     n: size of the supercell (area wise only)
#     """
# 
#     factors = []
#     for i in range(1, n + 1):
#         if n % i == 0:
#             factors.append(i)
# 
#     trans_matrices = []
#     for i in factors:
#         m = n // i
#         tm = [[[i, j], [0, m]] for j in range(m)]
#         trans_matrices.append(tm)
#     all_tm = []
#     for i in range(0, len(trans_matrices)):
#         each_set = trans_matrices[i]
#         for j in range(0,len(each_set)):
#             all_tm.append(each_set[j])
#     return all_tm


# Path: mpinterfaces/tests/test_get_trans_matrices.py
import unittest
from mpinterfaces.transformations import get_trans_matrices


    for i in generated_list:
        for j in i:
            generated_list_2.append(j)

    return generated_list_2

def get_divisors_sum(number):
    """
    Gives the sum of divisors of a number = S
    According to the Zur algorithm, S should be equal to total number of
    trans_matrices
    """
    if number == 0:
        return 0

    divisors_list = []
    for i in range(number+1):
        j = i + 1
        if number % j == 0:
            divisors_list.append(j)

    return sum(divisors_list)


class TestGetTransMatrices(unittest.TestCase):
    """ Test get_trans_matrices  """

    def test_0(self):
        self.assertEqual([], get_trans_matrices(0))

        self.assertEqual(len(get_trans_matrices(0)), get_divisors_sum(0))