aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2024-03-18 22:14:28 +0100
committerNao Pross <np@0hm.ch>2024-03-18 22:14:28 +0100
commitedb932093b32127c67b358a56ab3afb7c054c968 (patch)
treeac69b8b2024b6c2b764ef68611805efe7a24e8ed
parentFix MatParam.to_repr (diff)
downloadmdpoly-edb932093b32127c67b358a56ab3afb7c054c968.tar.gz
mdpoly-edb932093b32127c67b358a56ab3afb7c054c968.zip
Fix mdpoly.test
Diffstat (limited to '')
-rw-r--r--mdpoly/test/__main__.py2
-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")