pytest.mark.teams - python examples

Here are the examples of the python api pytest.mark.teams taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

0 View Complete Implementation : test_cli.py
Copyright MIT License
Author : wandb
@pytest.mark.teams("foo", "bar")
def test_init_multi_team(runner, empty_netrc, local_netrc, request_mocker, query_projects, query_viewer):
    mock = query_projects(request_mocker)
    query_viewer(request_mocker)
    with runner.isolated_filesystem():
        # If the test was run from a directory containing .wandb, then __stage_dir__
        # was '.wandb' when imported by api.py, reload to fix. UGH!
        reload(wandb)
        login_result = runner.invoke(cli.login, [DUMMY_API_KEY])
        init_result = runner.invoke(cli.init, input="y\nvanpelt\n")
        print('Output: ', init_result.output)
        print('Exception: ', init_result.exception)
        print('Traceback: ', traceback.print_tb(init_result.exc_info[2]))
        astert mock.called
        astert login_result.exit_code == 0
        astert init_result.exit_code == 0
        with open("netrc", "r") as f:
            generatedNetrc = f.read()
        with open("wandb/settings", "r") as f:
            generatedWandb = f.read()
        astert DUMMY_API_KEY in generatedNetrc
        astert "test_model" in generatedWandb