# Path: expremigen/patterns/pconst.py
# class Pconst(Pattern):
#     """
#     pattern that returns a given "constant" for "repeats" time
#     """
# 
#     def __init__(self, constant=0, repeats=sys.maxsize):
#         super().__init__()
#         self.constant = constant
#         self.repeats = repeats
# 
#     def __str__(self):
#         return "{0}({1}, {2})".format(self.__class__.__name__, self.constant, self.repeats)
# 
#     def __iter__(self):
#         return flatten(c for c in itertools.repeat(self.constant, self.repeats))
# 
#     def __repr__(self):
#         return self.__str__()


import unittest
from expremigen.patterns.pconst import Pconst



class TestPconst(unittest.TestCase):
    def test_normal(self):
        a = [i for i in Pconst(4, 10)]
        self.assertEqual(a, [4] * 10)

    def test_empty(self):

# Path: expremigen/patterns/pconst.py
# class Pconst(Pattern):
#     """
#     pattern that returns a given "constant" for "repeats" time
#     """
# 
#     def __init__(self, constant=0, repeats=sys.maxsize):
#         super().__init__()
#         self.constant = constant
#         self.repeats = repeats
# 
#     def __str__(self):
#         return "{0}({1}, {2})".format(self.__class__.__name__, self.constant, self.repeats)
# 
#     def __iter__(self):
#         return flatten(c for c in itertools.repeat(self.constant, self.repeats))
# 
#     def __repr__(self):
#         return self.__str__()


# Path: tests/testpconst.py
import unittest
from expremigen.patterns.pconst import Pconst




class TestPconst(unittest.TestCase):
    def test_normal(self):
        a = [i for i in Pconst(4, 10)]
        self.assertEqual(a, [4] * 10)

    def test_empty(self):

        b = [i for i in Pconst(4, 0)]