@@ -150,7 +150,11 @@ async def test_open_with_id_and_name(
150
150
storage_client : StorageClient ,
151
151
) -> None :
152
152
"""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
+ ):
154
158
await Dataset .open (
155
159
id = 'some-id' ,
156
160
name = 'some-name' ,
@@ -651,7 +655,11 @@ async def test_alias_with_id_error(
651
655
storage_client : StorageClient ,
652
656
) -> None :
653
657
"""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
+ ):
655
663
await Dataset .open (
656
664
id = 'some-id' ,
657
665
alias = 'some-alias' ,
@@ -663,7 +671,11 @@ async def test_alias_with_name_error(
663
671
storage_client : StorageClient ,
664
672
) -> None :
665
673
"""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
+ ):
667
679
await Dataset .open (
668
680
name = 'some-name' ,
669
681
alias = 'some-alias' ,
@@ -675,7 +687,11 @@ async def test_alias_with_all_parameters_error(
675
687
storage_client : StorageClient ,
676
688
) -> None :
677
689
"""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
+ ):
679
695
await Dataset .open (
680
696
id = 'some-id' ,
681
697
name = 'some-name' ,
0 commit comments