コード例 #1
0
def pytest_configure(config):
    # try to figure out trezor version
    global TREZOR_VERSION
    try:
        TREZOR_VERSION = device_version()
    except Exception:
        pass

    # register known markers
    config.addinivalue_line("markers", "skip_t1: skip the test on Trezor One")
    config.addinivalue_line("markers", "skip_t2: skip the test on Trezor T")
    with open(os.path.join(os.path.dirname(__file__), "REGISTERED_MARKERS")) as f:
        for line in f:
            config.addinivalue_line("markers", line.strip())

    # enable debug
    if config.getoption("verbose"):
        log.enable_debug_output()
コード例 #2
0
def pytest_configure(config):
    """Called at testsuite setup time.

    Registers known markers, enables verbose output if requested.
    """
    # register known markers
    config.addinivalue_line("markers", "skip_t1: skip the test on Trezor One")
    config.addinivalue_line("markers", "skip_t2: skip the test on Trezor T")
    config.addinivalue_line(
        "markers",
        'setup_client(mnemonic="all all all...", pin=None, passphrase=False, uninitialized=False): configure the client instance',
    )
    with open(os.path.join(os.path.dirname(__file__),
                           "REGISTERED_MARKERS")) as f:
        for line in f:
            config.addinivalue_line("markers", line.strip())

    # enable debug
    if config.getoption("verbose"):
        log.enable_debug_output()
コード例 #3
0
def pytest_configure(config):
    # try to figure out trezor version
    global TREZOR_VERSION
    try:
        TREZOR_VERSION = device_version()
    except Exception:
        pass

    # register known markers
    config.addinivalue_line("markers", "skip_t1: skip the test on Trezor One")
    config.addinivalue_line("markers", "skip_t2: skip the test on Trezor T")
    config.addinivalue_line(
        "markers",
        'setup_client(mnemonic="all all all...", pin=None, passphrase=False, uninitialized=False): configure the client instance',
    )
    with open(os.path.join(os.path.dirname(__file__),
                           "REGISTERED_MARKERS")) as f:
        for line in f:
            config.addinivalue_line("markers", line.strip())

    # enable debug
    if config.getoption("verbose"):
        log.enable_debug_output()
コード例 #4
0
ファイル: conftest.py プロジェクト: laseryuan/python-trezor
def pytest_configure(config):
    global TREZOR_VERSION
    TREZOR_VERSION = device_version()

    if config.getoption("verbose"):
        log.enable_debug_output()
コード例 #5
0
def pytest_configure(config):
    if config.getoption('verbose'):
        log.enable_debug_output()
コード例 #6
0
ファイル: conftest.py プロジェクト: trezor/python-trezor
def pytest_configure(config):
    global TREZOR_VERSION
    TREZOR_VERSION = device_version()

    if config.getoption("verbose"):
        log.enable_debug_output()