• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python spec.skip函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: load_failure

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


示例17: should_show_core_usage_on_core_failures

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


示例18: wrapper

 def wrapper(*args, **kwargs):
     if WINDOWS:
         skip()
     return fn(*args, **kwargs)
开发者ID:melor,项目名称:invoke,代码行数:4,代码来源:_utils.py


示例19: kind_to_placeholder_map

 def kind_to_placeholder_map(self):
     # str=STRING, int=INT, etc etc
     skip()
开发者ID:B-Rich,项目名称:invoke,代码行数:3,代码来源:context.py


示例20: is_aliased_to_dunder_getitem

 def is_aliased_to_dunder_getitem(self):
     "is aliased to __getitem__"
     skip()
开发者ID:msabramo,项目名称:invoke,代码行数:3,代码来源:collection.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python helpers.failure函数代码示例发布时间:2022-05-27
下一篇:
Python spec.ok_函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap