diff options
-rw-r--r-- | crocoite/behavior.py | 12 | ||||
-rw-r--r-- | crocoite/test_behavior.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/crocoite/behavior.py b/crocoite/behavior.py index dcab33a..dff1439 100644 --- a/crocoite/behavior.py +++ b/crocoite/behavior.py @@ -95,17 +95,17 @@ class Behavior: """ After loading the page started """ # this is a dirty hack to make this function an async generator return - yield + yield # pragma: no cover async def onstop (self): """ Before page loading is stopped """ return - yield + yield # pragma: no cover async def onfinish (self): """ After the site has stopped loading """ return - yield + yield # pragma: no cover class JsOnload (Behavior): """ Execute JavaScript on page load """ @@ -154,7 +154,7 @@ class JsOnload (Behavior): await tab.Runtime.callFunctionOn (functionDeclaration='function(){return this.stop();}', objectId=self.context) await tab.Runtime.releaseObject (objectId=self.context) return - yield + yield # pragma: no cover ### Generic scripts ### @@ -191,7 +191,7 @@ class EmulateScreenMetrics (Behavior): await asyncio.sleep (1) await tab.Emulation.clearDeviceMetricsOverride () return - yield + yield # pragma: no cover class DomSnapshotEvent: __slots__ = ('url', 'document', 'viewport') @@ -337,7 +337,7 @@ class Crash (Behavior): except Crashed: pass return - yield + yield # pragma: no cover # available behavior scripts. Order matters, move those modifying the page # towards the end of available diff --git a/crocoite/test_behavior.py b/crocoite/test_behavior.py index a1eef79..2c13804 100644 --- a/crocoite/test_behavior.py +++ b/crocoite/test_behavior.py @@ -69,7 +69,7 @@ class ClickTester (Behavior): # assert any (map (lambda x: x['type'] == 'click', listeners)), listeners return - yield + yield # pragma: no cover @pytest.mark.parametrize("url,selector", clickParam) @pytest.mark.asyncio |