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

Commit b0c43c1

Browse files
committed
Add test_check_without_open_call; Update test_check_settings
1 parent bdc4725 commit b0c43c1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/unit/eyes_core/test_check_settings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ def test_set_get_enable_patterns():
1919
def test_set_get_ignore_displacement():
2020
cs = CheckSettings().ignore_displacement(True)
2121
assert cs.values.ignore_displacement
22+
cs = cs.layout().ignore_displacement(False)
23+
assert not cs.values.ignore_displacement

tests/unit/eyes_selenium/test_eyes.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
import pytest
55
from mock import patch
66

7-
from applitools.common import MatchLevel, StitchMode, BatchInfo
7+
from applitools.common import MatchLevel, StitchMode, BatchInfo, EyesError
88
from applitools.common.utils import json_utils
99
from applitools.core import NullScaleProvider
10-
from applitools.selenium import Eyes
10+
from applitools.selenium import Eyes, Target
1111
from applitools.selenium.visual_grid import VisualGridRunner
1212

1313

@@ -128,3 +128,8 @@ def test_batch_info_serializing(eyes, driver_mock):
128128

129129
def test_eyes_abort(eyes):
130130
eyes.abort()
131+
132+
133+
def test_check_without_open_call(eyes):
134+
with pytest.raises(EyesError):
135+
eyes.check("Test", Target.window())

0 commit comments

Comments
 (0)