We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d2fc9c8 commit 7a10f98Copy full SHA for 7a10f98
1 file changed
apis/python/tests/test_dataset.py
@@ -80,6 +80,14 @@ def test_retrieve_attributes(v3_dataset):
80
assert v3_dataset.attributes(attr_type="fmt") == fmt_attrs
81
82
83
+def test_retrieve_attributes_invalid_type_raises(v3_dataset):
84
+ """attributes() raises for an unrecognised attr_type.
85
+ Note: the implementation uses '% attr_types' where attr_types is a tuple, so
86
+ Python raises TypeError instead of the intended ValueError."""
87
+ with pytest.raises(TypeError):
88
+ v3_dataset.attributes(attr_type="unknown")
89
+
90
91
def test_retrieve_samples(v3_dataset):
92
assert v3_dataset.samples() == ["HG00280", "HG01762"]
93
0 commit comments