Skip to content
This repository was archived by the owner on Aug 10, 2022. It is now read-only.

Commit eee05c3

Browse files
committed
Add tests for unsupported input
1 parent 16e86e8 commit eee05c3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/unit/eyes_selenium/test_selenium_check_settings.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@ def get_regions_from_(method_name, *args):
3030
return regions
3131

3232

33+
def test_check_region_and_frame_with_unsupported_input():
34+
with pytest.raises(TypeError):
35+
cs = get_cs_from_method("region", 12355)
36+
with pytest.raises(TypeError):
37+
cs = get_cs_from_method("frame", [By.XPATH, "some"])
38+
39+
40+
@pytest.mark.parametrize("method_name", ["ignore", "layout", "strict", "content"])
41+
def test_match_region_with_unsupported_input(method_name):
42+
with pytest.raises(TypeError):
43+
cs = get_cs_from_method(method_name, 1245)
44+
45+
3346
def test_check_frame(method_name="frame"):
3447
frame_reference = "frame-name-or-id"
3548
cs = get_cs_from_method(method_name, frame_reference)

0 commit comments

Comments
 (0)