We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 008c59a commit feaabb9Copy full SHA for feaabb9
tests/test_selectorlib.py
@@ -110,10 +110,18 @@ def test_extract_field_supported_item_types(
110
}
111
112
113
-def test_extract_field_unsupported_item_types():
114
- yaml_string = """test_text:
+@pytest.mark.parametrize("unsupported_item_type", [
+ "text",
115
+ "html",
116
+ "link",
117
+ "image",
118
+ "attribute",
119
+ "test_item_type"
120
+])
121
+def test_extract_field_unsupported_item_types(unsupported_item_type):
122
+ yaml_string = f"""test_text:
123
css: null
124
xpath: '//p'
- type: text"""
125
+ type: {unsupported_item_type}"""
126
with pytest.raises(exceptions.UnsupportedItemType):
127
selectorlib.Extractor.from_yaml_string(yaml_string)
0 commit comments