Skip to content

Commit

Permalink
update tests to new Param 2 error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
maximlt committed Aug 25, 2023
1 parent e2f06d0 commit 51ad3fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion holoviews/tests/element/test_annotations.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AnnotationTests(ComparisonTestCase):
"""

def test_hline_invalid_constructor(self):
err = "ClassSelector parameter 'y' value must be an instance of"
err = "ClassSelector parameter 'HLine.y' value must be an instance of"
with pytest.raises(ValueError) as excinfo:
HLine(None)
assert err in str(excinfo.value)
Expand Down
8 changes: 4 additions & 4 deletions holoviews/tests/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,24 @@ def test_XY_instance(self):
self.assertEqual(xy.y, 2)

def test_XY_set_invalid_class_x(self):
regexp = "Parameter 'x' only takes numeric values"
regexp = "Number parameter 'XY.x' only takes numeric values"
with self.assertRaisesRegex(ValueError, regexp):
self.XY.x = 'string'

def test_XY_set_invalid_class_y(self):
regexp = "Parameter 'y' only takes numeric values"
regexp = "Number parameter 'XY.y' only takes numeric values"
with self.assertRaisesRegex(ValueError, regexp):
self.XY.y = 'string'

def test_XY_set_invalid_instance_x(self):
xy = self.XY(x=1,y=2)
regexp = "Parameter 'x' only takes numeric values"
regexp = "Number parameter 'XY.x' only takes numeric values"
with self.assertRaisesRegex(ValueError, regexp):
xy.x = 'string'

def test_XY_set_invalid_instance_y(self):
xy = self.XY(x=1,y=2)
regexp = "Parameter 'y' only takes numeric values"
regexp = "Number parameter 'XY.y' only takes numeric values"
with self.assertRaisesRegex(ValueError, regexp):
xy.y = 'string'

Expand Down

0 comments on commit 51ad3fa

Please sign in to comment.