当前位置: 首页>>代码示例>>Python>>正文


Python spec.skip函数代码示例

本文整理汇总了Python中spec.skip函数的典型用法代码示例。如果您正苦于以下问题:Python skip函数的具体用法?Python skip怎么用?Python skip使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了skip函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: falls_back_to_defaultlocale_when_preferredencoding_is_None

 def falls_back_to_defaultlocale_when_preferredencoding_is_None(self):
     if not six.PY3:
         skip()
     with patch('invoke.runners.locale') as fake_locale:
         fake_locale.getdefaultlocale.return_value = (None, None)
         fake_locale.getpreferredencoding.return_value = 'FALLBACK'
         eq_(self._runner().default_encoding(), 'FALLBACK')
开发者ID:bollwyvl,项目名称:invoke,代码行数:7,代码来源:runners.py

示例2: bool_implies_default_False_not_None

 def bool_implies_default_False_not_None(self):
     # Right now, parsing a bool flag not given results in None
     # TODO: may want more nuance here -- False when a --no-XXX flag is
     # given, True if --XXX, None if not seen?
     # Only makes sense if we add automatic --no-XXX stuff (think
     # ./configure)
     skip()
开发者ID:hirokiky,项目名称:invoke,代码行数:7,代码来源:argument.py

示例3: stdin_mirroring_isnt_cpu_heavy

 def stdin_mirroring_isnt_cpu_heavy(self):
     "stdin mirroring isn't CPU-heavy"
     # CPU measurement under PyPy is...rather different. NBD.
     if PYPY:
         skip()
     with assert_cpu_usage(lt=5.0):
         run("python -u busywork.py 10", pty=True, hide=True)
开发者ID:bollwyvl,项目名称:invoke,代码行数:7,代码来源:runners.py

示例4: isnt_cpu_heavy

 def isnt_cpu_heavy(self):
     "stdin mirroring isn't CPU-heavy"
     # CPU measurement under PyPy is...rather different. NBD.
     if PYPY:
         skip()
     # Python 3.5 has been seen using up to ~6.0s CPU time under Travis
     with assert_cpu_usage(lt=7.0):
         run("python -u busywork.py 10", pty=True, hide=True)
开发者ID:brutus,项目名称:invoke,代码行数:8,代码来源:runners.py

示例5: invocable_via_python_dash_m

 def invocable_via_python_dash_m(self):
     # TODO: replace with pytest marker after pytest port
     if sys.version_info < (2, 7):
         skip()
     _output_eq(
         "python -m invoke print_name --name mainline",
         "mainline\n",
     )
开发者ID:jr-minnaar,项目名称:invoke,代码行数:8,代码来源:main.py

示例6: echo_hides_extra_sudo_flags

 def echo_hides_extra_sudo_flags(self):
     skip() # see TODO in sudo() re: clean output display
     config = Config(overrides={'runner': _Dummy})
     Context(config=config).sudo('nope', echo=True)
     output = sys.stdout.getvalue()
     sys.__stderr__.write(repr(output) + "\n")
     ok_("-S" not in output)
     ok_(Context().sudo.prompt not in output)
     ok_("sudo nope" in output)
开发者ID:yws,项目名称:invoke,代码行数:9,代码来源:context.py

示例7: base_case

 def base_case(self):
     # NOTE: Assumes a user whose password is 'mypass' has been created
     # & added to passworded (not passwordless) sudo configuration; and
     # that this user is the one running the test suite. Only for
     # running on Travis, basically.
     if not os.environ.get('TRAVIS', False):
         skip()
     config = Config(overrides={'sudo': {'password': 'mypass'}})
     result = Context(config=config).sudo('whoami', hide=True)
     eq_(result.stdout.strip(), 'root')
开发者ID:gtback,项目名称:invoke,代码行数:10,代码来源:context.py

示例8: manual_threading_works_okay

 def manual_threading_works_okay(self):
     # TODO: needs https://github.com/pyinvoke/invoke/issues/438 fixed
     # before it will reliably pass
     skip()
     # Kind of silly but a nice base case for "how would someone thread this
     # stuff; and are there any bizarre gotchas lurking in default
     # config/context/connection state?"
     # Specifically, cut up the local (usually 100k's long) words dict into
     # per-thread chunks, then read those chunks via shell command, as a
     # crummy "make sure each thread isn't polluting things like stored
     # stdout" sanity test
     queue = Queue()
     # TODO: skip test on Windows or find suitable alternative file
     with codecs.open(_words, encoding='utf-8') as fd:
         data = [x.strip() for x in fd.readlines()]
     threads = []
     num_words = len(data)
     chunksize = len(data) / len(self.cxns) # will be an int, which is fine
     for i, cxn in enumerate(self.cxns):
         start = i * chunksize
         end = max([start + chunksize, num_words])
         chunk = data[start:end]
         kwargs = dict(
             queue=queue,
             cxn=cxn,
             start=start,
             num_words=num_words,
             count=len(chunk),
             expected=chunk,
         )
         thread = ExceptionHandlingThread(target=_worker, kwargs=kwargs)
         threads.append(thread)
     for t in threads:
         t.start()
     for t in threads:
         t.join(5) # Kinda slow, but hey, maybe the test runner is hot
     while not queue.empty():
         cxn, result, expected = queue.get(block=False)
         for resultword, expectedword in zip_longest(result, expected):
             err = u"({2!r}, {3!r}->{4!r}) {0!r} != {1!r}".format(
                 resultword, expectedword, cxn, expected[0], expected[-1],
             )
             assert resultword == expectedword, err
开发者ID:bossjones,项目名称:fabric,代码行数:43,代码来源:concurrency.py

示例9: honors_kwarg

 def honors_kwarg(self):
     skip()
开发者ID:tyewang,项目名称:invoke,代码行数:2,代码来源:runners.py

示例10: inner

 def inner(*args, **kwargs):
     if getattr(sys.stdout, 'encoding', None) == 'UTF-8':
         return f(*args, **kwargs)
     # TODO: could remove this so they show green, but figure yellow is more
     # appropriate
     skip()
开发者ID:brutus,项目名称:invoke,代码行数:6,代码来源:_util.py

示例11: KeyboardInterrupt_on_stdin_doesnt_flake

 def KeyboardInterrupt_on_stdin_doesnt_flake(self):
     # E.g. inv test => Ctrl-C halfway => shouldn't get buffer API errors
     skip()
开发者ID:kejbaly2,项目名称:invoke,代码行数:3,代码来源:main.py

示例12: iter

 def iter(self):
     "__iter__"
     skip()
开发者ID:pombredanne,项目名称:invoke,代码行数:3,代码来源:context.py

示例13: values

 def values(self):
     skip()
开发者ID:pombredanne,项目名称:invoke,代码行数:2,代码来源:context.py

示例14: keys

 def keys(self):
     skip()
开发者ID:pombredanne,项目名称:invoke,代码行数:2,代码来源:context.py

示例15: finds_subcollection_tasks_by_dotted_name

 def finds_subcollection_tasks_by_dotted_name(self):
     skip()
开发者ID:msabramo,项目名称:invoke,代码行数:2,代码来源:collection.py


注:本文中的spec.skip函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。