Did I find the right examples for you? yes no

All Samples(17)  |  Call(0)  |  Derive(0)  |  Import(17)
If test function is wrapped into this decorator then
it should be called only for specified transport.

        def only_transport(transport):
    """
    If test function is wrapped into this decorator then
    it should be called only for specified transport.
    """

    def wrapper(func):
        @functools.wraps(func)
        def test_method(*args, **kwargs):
            if GRAB_TRANSPORT == transport:
                func(*args, **kwargs)
            else:
                return
        return test_method
    return wrapper
        


src/g/r/grab-HEAD/test/selector_kit.py   grab(Download)
#sys.path.insert(0, root)
 
from .util import GRAB_TRANSPORT, ignore_transport, only_transport
from .tornado_util import SERVER
from grab.selector import KitSelector

src/g/r/grab-HEAD/test/grab_xml_processing.py   grab(Download)
# coding: utf-8
from unittest import TestCase
 
from grab import Grab
from .util import GRAB_TRANSPORT, ignore_transport, only_transport

src/g/r/grab-HEAD/test/grab_user_agent.py   grab(Download)
# coding: utf-8
from unittest import TestCase
 
from grab import Grab, GrabMisuseError
from .util import GRAB_TRANSPORT, ignore_transport, only_transport

src/g/r/grab-HEAD/test/grab_response_body_processing.py   grab(Download)
 
from grab import Grab, GrabMisuseError
from .util import (GRAB_TRANSPORT, TMP_DIR,
                   ignore_transport, only_transport)
from .tornado_util import SERVER

src/g/r/grab-HEAD/test/grab_redirect.py   grab(Download)
from grab.error import GrabTooManyRedirectsError
from .tornado_util import SERVER
from .util import GRAB_TRANSPORT, only_transport
 
class RedirectController(object):

src/g/r/grab-HEAD/test/grab_js.py   grab(Download)
 
from grab import Grab, GrabMisuseError
from .util import (GRAB_TRANSPORT, TMP_DIR,
                   ignore_transport, only_transport)
from .tornado_util import SERVER

src/g/r/grab-HEAD/test/grab_get_request.py   grab(Download)
 
from grab import Grab, GrabMisuseError
from .util import (GRAB_TRANSPORT, TMP_DIR,
                   ignore_transport, only_transport)
from .tornado_util import SERVER

src/g/r/grab-HEAD/test/grab_charset.py   grab(Download)
 
from grab import Grab, GrabMisuseError
from .util import GRAB_TRANSPORT, ignore_transport, only_transport
from .tornado_util import SERVER
from grab.extension import register_extensions

src/g/r/grab-HEAD/test/grab_api.py   grab(Download)
# coding: utf-8
from unittest import TestCase
 
from grab import Grab, GrabMisuseError
from .util import GRAB_TRANSPORT, ignore_transport, only_transport

src/g/r/grab-0.4.13/test/selector_kit.py   grab(Download)
#sys.path.insert(0, root)
 
from .util import GRAB_TRANSPORT, ignore_transport, only_transport
from .tornado_util import SERVER
from grab.selector import KitSelector

  1 | 2  Next