python类org()的实例源码

python.py 文件源码 项目:GSM-scanner 作者: yosriayed 项目源码 文件源码 阅读 32 收藏 0 点赞 0 评论 0
def pytest_configure(config):
    config.addinivalue_line("markers",
        "parametrize(argnames, argvalues): call a test function multiple "
        "times passing in different arguments in turn. argvalues generally "
        "needs to be a list of values if argnames specifies only one name "
        "or a list of tuples of values if argnames specifies multiple names. "
        "Example: @parametrize('arg1', [1,2]) would lead to two calls of the "
        "decorated test function, one with arg1=1 and another with arg1=2."
        "see http://pytest.org/latest/parametrize.html for more info and "
        "examples."
    )
    config.addinivalue_line("markers",
        "usefixtures(fixturename1, fixturename2, ...): mark tests as needing "
        "all of the specified fixtures. see http://pytest.org/latest/fixture.html#usefixtures "
    )
conftest.py 文件源码 项目:mac-package-build 作者: persepolisdm 项目源码 文件源码 阅读 28 收藏 0 点赞 0 评论 0
def data_dir(
  # The request object for this test. See
  # https://pytest.org/latest/builtin.html#_pytest.python.FixtureRequest
  # and
  # https://pytest.org/latest/fixture.html#fixtures-can-introspect-the-requesting-test-context.
  request,
  # The tmpdir object for this test. See
  # https://pytest.org/latest/tmpdir.html.
  tmpdir):

    # Strip the leading 'test_' from the test's name.
    name = request.function.__name__[5:]
    # Copy to tmpdir and return the path.
    return _data_dir_copy(name, tmpdir)


问题


面经


文章

微信
公众号

扫码关注公众号