From 3dfe3b408c2705cced8257d34c7cea200b556f4e Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Mon, 19 Aug 2024 11:51:17 -0400 Subject: [PATCH] ValueError to TypeError for two test functions --- src/diffpy/srfit/tests/testliterals.py | 4 ++-- src/diffpy/srfit/tests/testvisitors.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/diffpy/srfit/tests/testliterals.py b/src/diffpy/srfit/tests/testliterals.py index 7667be3e..542cab6f 100644 --- a/src/diffpy/srfit/tests/testliterals.py +++ b/src/diffpy/srfit/tests/testliterals.py @@ -118,7 +118,7 @@ def testAddLiteral(self): """Test adding a literal to an operator node.""" op = self.op - self.assertRaises(ValueError, op.getValue) + self.assertRaises(TypeError, op.getValue) op._value = 1 self.assertEqual(op.getValue(), 1) @@ -127,7 +127,7 @@ def testAddLiteral(self): b = literals.Argument(name = "b", value = 0) op.addLiteral(a) - self.assertRaises(ValueError, op.getValue) + self.assertRaises(TypeError, op.getValue) op.addLiteral(b) self.assertAlmostEqual(0, op.value) diff --git a/src/diffpy/srfit/tests/testvisitors.py b/src/diffpy/srfit/tests/testvisitors.py index 2089547b..6dda1fbc 100644 --- a/src/diffpy/srfit/tests/testvisitors.py +++ b/src/diffpy/srfit/tests/testvisitors.py @@ -195,7 +195,7 @@ def testSimpleFunction(self): self.assertTrue(plus2.hasObserver(mult._flush)) # plus2 has no arguments yet. Verify this. - self.assertRaises(ValueError, mult.getValue) + self.assertRaises(TypeError, mult.getValue) # Add the arguments to plus2. plus2.addLiteral(v4) plus2.addLiteral(v5)