Skip to content

Commit

Permalink
add doctest, remove dead code discovered by codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Oct 26, 2024
1 parent 070a08e commit 96a5aa0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sage/rings/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,11 @@ def factor(self):
sage: f = (3*E2*X + C3)*(2*E2 + C3)
sage: factor(f)
(2*E_2 + C_3) * (3*X*E_2 + C_3)
TESTS::
sage: P(6).factor()
2 * 3
"""
# find the set of atoms and fix an order
atoms = list(set(a for m in self.monomial_coefficients()
Expand All @@ -1925,8 +1930,6 @@ def factor(self):
for m, c in self)
factors = poly.factor()
unit = self.base_ring()(factors.unit())
if factors.universe() == self.base_ring():
return Factorization(factors, unit=unit) # TODO: testme
P = self.parent()
M = P._indices

Expand Down

0 comments on commit 96a5aa0

Please sign in to comment.