@@ -150,7 +150,11 @@ async def test_open_with_id_and_name(
150150 storage_client : StorageClient ,
151151) -> None :
152152 """Test that open() raises an error when both id and name are provided."""
153- with pytest .raises (ValueError , match = r'Only one of "id", "name", or "alias" can be specified, not multiple.' ):
153+ with pytest .raises (
154+ ValueError ,
155+ match = r'Only one of "id", "name", "alias" can be specified, but following arguments '
156+ r'were specified: "id", "name".' ,
157+ ):
154158 await Dataset .open (
155159 id = 'some-id' ,
156160 name = 'some-name' ,
@@ -651,7 +655,11 @@ async def test_alias_with_id_error(
651655 storage_client : StorageClient ,
652656) -> None :
653657 """Test that providing both alias and id raises error."""
654- with pytest .raises (ValueError , match = r'Only one of "id", "name", or "alias" can be specified, not multiple.' ):
658+ with pytest .raises (
659+ ValueError ,
660+ match = r'Only one of "id", "name", "alias" can be specified, but following arguments '
661+ r'were specified: "id", "alias".' ,
662+ ):
655663 await Dataset .open (
656664 id = 'some-id' ,
657665 alias = 'some-alias' ,
@@ -663,7 +671,11 @@ async def test_alias_with_name_error(
663671 storage_client : StorageClient ,
664672) -> None :
665673 """Test that providing both alias and name raises error."""
666- with pytest .raises (ValueError , match = r'Only one of "id", "name", or "alias" can be specified, not multiple.' ):
674+ with pytest .raises (
675+ ValueError ,
676+ match = r'Only one of "id", "name", "alias" can be specified, but following arguments '
677+ r'were specified: "name", "alias".' ,
678+ ):
667679 await Dataset .open (
668680 name = 'some-name' ,
669681 alias = 'some-alias' ,
@@ -675,7 +687,11 @@ async def test_alias_with_all_parameters_error(
675687 storage_client : StorageClient ,
676688) -> None :
677689 """Test that providing id, name, and alias raises error."""
678- with pytest .raises (ValueError , match = r'Only one of "id", "name", or "alias" can be specified, not multiple.' ):
690+ with pytest .raises (
691+ ValueError ,
692+ match = r'Only one of "id", "name", "alias" can be specified, but following arguments '
693+ r'were specified: "id", "name", "alias".' ,
694+ ):
679695 await Dataset .open (
680696 id = 'some-id' ,
681697 name = 'some-name' ,
0 commit comments