generated from allenai/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
19 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
from beaker.client import Beaker | ||
|
||
|
||
def test_dataset_get(client: Beaker, squad_dataset_name: str): | ||
dataset = client.dataset.get(squad_dataset_name) | ||
assert dataset.name is not None | ||
# Try with ID. | ||
client.dataset.get(dataset.id) | ||
# Try with just name (without account prefix). | ||
client.dataset.get(dataset.name) | ||
|
||
|
||
def test_dataset_ls(client: Beaker, squad_dataset_name: str): | ||
client.dataset.ls(squad_dataset_name) | ||
|
||
|
||
def test_file_info(client: Beaker, squad_dataset_name: str, squad_dataset_file_name: str): | ||
client.dataset.file_info(squad_dataset_name, squad_dataset_file_name) | ||
|
||
|
||
def test_upload(client: Beaker, dataset_name: str): | ||
def test_create_upload_commit(client: Beaker, dataset_name: str): | ||
ds = client.dataset.create(dataset_name, commit=False) | ||
client.dataset.upload(ds, b"foo-bar", "foo-bar") | ||
client.dataset.commit(ds) | ||
client.dataset.ls(ds) | ||
client.dataset.file_info(ds, "foo-bar") |