diff options
-rw-r--r-- | mdpoly/test/__main__.py | 2 | ||||
-rw-r--r-- | mdpoly/test/expressions.py (renamed from mdpoly/test/algebra.py) | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/mdpoly/test/__main__.py b/mdpoly/test/__main__.py index b034fb4..722065f 100644 --- a/mdpoly/test/__main__.py +++ b/mdpoly/test/__main__.py @@ -1,6 +1,6 @@ import unittest -from .algebra import TestPolyRingExpr +from .expressions import TestPolyExpressions from .index import TestPolyVarIndex, TestPolyIndex unittest.main() diff --git a/mdpoly/test/algebra.py b/mdpoly/test/expressions.py index 158b224..1520f12 100644 --- a/mdpoly/test/algebra.py +++ b/mdpoly/test/expressions.py @@ -1,19 +1,21 @@ -""" Tests for :py:mod:`mdpoly.algebra` """ +""" Tests for :py:mod:`mdpoly.expressions` """ from unittest import TestCase from .representations import TestRepr from .. import Variable, Constant, Parameter, State -from ..algebra import PolyRingExpr, PolyConst + +from ..abc import Expr from ..errors import AlgebraicError +from ..expressions import PolyConst from ..index import MatrixIndex from ..representations import SparseRepr -class TestPolyRingExpr(TestCase): +class TestPolyExpressions(TestCase): - def test_basic_algebra_correct(self): + def test_scalar_valid(self): x, y = Variable.from_names("x, y") k = Constant(2, "k") p = Parameter("p") @@ -28,9 +30,9 @@ class TestPolyRingExpr(TestCase): ) for result in ops: - self.assertIsInstance(result, PolyRingExpr) + self.assertIsInstance(result, Expr) - def test_basic_algebra_invalid(self): + def test_scalar_invalid(self): x, y = Variable.from_names("x, y") k = Constant(2, "k") |