Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CuriousDolphin committed Feb 3, 2025
1 parent f125f53 commit 9f49a73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions focoos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
DEV_API_URL,
LOCAL_API_URL,
PROD_API_URL,
DatasetInfo,
DatasetLayout,
DatasetMetadata,
DatasetPreview,
DeploymentMode,
FocoosDet,
FocoosDetections,
Expand Down Expand Up @@ -49,7 +49,7 @@
"FocoosTask",
"ModelMetadata",
"ModelStatus",
"DatasetInfo",
"DatasetPreview",
"DatasetLayout",
"DatasetMetadata",
"DeploymentMode",
Expand Down
6 changes: 3 additions & 3 deletions tests/test_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from pytest_mock import MockerFixture

from focoos.ports import (
DatasetInfo,
DatasetLayout,
DatasetPreview,
GPUInfo,
Hyperparameters,
SystemInfo,
Expand Down Expand Up @@ -32,14 +32,14 @@ def test_validate_wandb_project_invalid():

def test_validate_s3_url_valid():
url = "s3://bucketname/path"
dataset = DatasetInfo(url=url, name="test", layout=DatasetLayout.CATALOG)
dataset = DatasetPreview(url=url, name="test", layout=DatasetLayout.CATALOG)
assert dataset.url == url


def test_validate_s3_url_invalid():
url = "invalid_url"
with pytest.raises(ValidationError) as exc_info:
DatasetInfo(url=url, name="test", layout=DatasetLayout.CATALOG)
DatasetPreview(url=url, name="test", layout=DatasetLayout.CATALOG)
assert "Invalid S3 URL format, must be s3://BUCKET_NAME/path" in str(exc_info.value)


Expand Down

0 comments on commit 9f49a73

Please sign in to comment.