# Path: antitile/factor.py
# def factor(self):
#     """Factor this element."""
#     constructor = type(self)
#     one = constructor(1)
#     factors = self._factor()
#     nf = [f.normal_form()[0] for f in factors if f.anorm() > 1]
#     if nf:
#         backcalc = nf[-1]
#         for i in range(len(nf)-1):
#             f = nf[i]
#             if f.anorm() > 1:
#                 backcalc *= f
#     else:
#         backcalc = one
#     unit = self//backcalc
#     if unit != one or not nf:
#         nf.append(unit)
#     return sorted(nf)


import unittest
import doctest
from operator import mul
from functools import reduce
from itertools import product
from antitile import factor
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for the factor module in antitile.
"""


class TestFactor(unittest.TestCase):
    def setUp(self):

# Path: antitile/factor.py
# def factor(self):
#     """Factor this element."""
#     constructor = type(self)
#     one = constructor(1)
#     factors = self._factor()
#     nf = [f.normal_form()[0] for f in factors if f.anorm() > 1]
#     if nf:
#         backcalc = nf[-1]
#         for i in range(len(nf)-1):
#             f = nf[i]
#             if f.anorm() > 1:
#                 backcalc *= f
#     else:
#         backcalc = one
#     unit = self//backcalc
#     if unit != one or not nf:
#         nf.append(unit)
#     return sorted(nf)


# Path: tests/test_factor.py
import unittest
import doctest
from operator import mul
from functools import reduce
from itertools import product
from antitile import factor

#! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Tests for the factor module in antitile.
"""


class TestFactor(unittest.TestCase):
    def setUp(self):

        self.domains = [factor.Integer,