# Path: monty/math.py
# def nCr(n, r):
#     """
#     Calculates nCr.
# 
#     Args:
#         n (int): total number of items.
#         r (int): items to choose
# 
#     Returns:
#         nCr.
#     """
#     f = math.factorial
#     return int(f(n) / f(r) / f(n - r))
# 
# def nPr(n, r):
#     """
#     Calculates nPr.
# 
#     Args:
#         n (int): total number of items.
#         r (int): items to permute
# 
#     Returns:
#         nPr.
#     """
#     f = math.factorial
#     return int(f(n) / f(n - r))


import unittest
from monty.math import nCr, nPr



class FuncTest(unittest.TestCase):
    def test_nCr(self):
        self.assertEqual(nCr(4, 2), 6)

    def test_deprecated_property(self):
        self.assertEqual(nPr(4, 2), 12)



# Path: monty/math.py
# def nCr(n, r):
#     """
#     Calculates nCr.
# 
#     Args:
#         n (int): total number of items.
#         r (int): items to choose
# 
#     Returns:
#         nCr.
#     """
#     f = math.factorial
#     return int(f(n) / f(r) / f(n - r))
# 
# def nPr(n, r):
#     """
#     Calculates nPr.
# 
#     Args:
#         n (int): total number of items.
#         r (int): items to permute
# 
#     Returns:
#         nPr.
#     """
#     f = math.factorial
#     return int(f(n) / f(n - r))


# Path: tests/test_math.py
import unittest
from monty.math import nCr, nPr




class FuncTest(unittest.TestCase):
    def test_nCr(self):
        self.assertEqual(nCr(4, 2), 6)

    def test_deprecated_property(self):
        self.assertEqual(nPr(4, 2), 12)



if __name__ == "__main__":