-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added BigQuery client method (create table) for Tables API #3
Changes from 3 commits
2616602
7970536
b3f61b9
eed701f
19124c0
7b35b52
64592ba
cd66b9a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,10 @@ | |
from .. import create_table | ||
|
||
|
||
def test_table_samples(capsys, client, project_id, dataset_id, table_id): | ||
"""Since creating a table is a long operation, test all table model samples | ||
def test_table_samples(capsys, client, random_table_id): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function can be renamed to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changed the name as directed. |
||
"""Since creating a table is a long operation, test all table samples | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Creating a table isn't all that long of an operation. You can test each sample separately. This docstring comment can be removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed this docstring. |
||
in the same test, following a typical end-to-end flow. | ||
""" | ||
create_table.create_table(client, project_id, dataset_id, table_id) | ||
create_table.create_table(client, random_table_id) | ||
out, err = capsys.readouterr() | ||
assert create_table in out | ||
assert table.table_id == "my_table" | ||
assert "Created table {}".format(random_table_id) in out |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit, since you don't have to do any cleanup, this can now be
return
instead ofyield
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced both table and dataset fixtures to return instead of yield.