Skip to content

Commit 72b4958

Browse files
committed
fix: change error raised by badly formed input for numpy.add operator in literals tests
1 parent 4a00cb8 commit 72b4958

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/diffpy/srfit/equation/literals/operators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Operator(Literal, OperatorABC):
4141
"""Abstract class for specifying a general operator.
4242
4343
This class provides several methods that are common to a derived
44-
classes for concrete concrete operations.
44+
classes for concrete operations.
4545
4646
Class Attributes
4747
----------------

tests/test_literals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def testAddLiteral(self):
118118
"""Test adding a literal to an operator node."""
119119
op = self.op
120120

121-
self.assertRaises(ValueError, op.getValue)
121+
self.assertRaises(TypeError, op.getValue)
122122
op._value = 1
123123
self.assertEqual(op.getValue(), 1)
124124

@@ -127,7 +127,7 @@ def testAddLiteral(self):
127127
b = literals.Argument(name = "b", value = 0)
128128

129129
op.addLiteral(a)
130-
self.assertRaises(ValueError, op.getValue)
130+
self.assertRaises(TypeError, op.getValue)
131131

132132
op.addLiteral(b)
133133
self.assertAlmostEqual(0, op.value)

tests/test_visitors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def testSimpleFunction(self):
194194
self.assertTrue(plus2.hasObserver(mult._flush))
195195

196196
# plus2 has no arguments yet. Verify this.
197-
self.assertRaises(ValueError, mult.getValue)
197+
self.assertRaises(TypeError, mult.getValue)
198198
# Add the arguments to plus2.
199199
plus2.addLiteral(v4)
200200
plus2.addLiteral(v5)

0 commit comments

Comments
 (0)