Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
Signed-off-by: ThibaultFy <50656860+ThibaultFy@users.noreply.github.com>
  • Loading branch information
ThibaultFy committed Nov 2, 2023
1 parent 07f012c commit 9f0e61d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/sdk/test_schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,23 @@ def test_datasample_spec_resolve_paths():
datasample_spec = DataSampleSpec(paths=paths, data_manager_keys=[str(uuid.uuid4())])

assert all([path == pathlib.Path().cwd() / "data" for path in datasample_spec.paths])


def test_datasample_spec_exclusive_path():
with pytest.raises(ValueError):
DataSampleSpec(paths=["fake_paths"], path="fake_paths", data_manager_keys=[str(uuid.uuid4())])


def test_datasample_spec_no_path():
with pytest.raises(ValueError):
DataSampleSpec(data_manager_keys=[str(uuid.uuid4())])


def test_datasample_spec_paths_explicit_none():
with pytest.raises(TypeError):
DataSampleSpec(paths=None, data_manager_keys=[str(uuid.uuid4())])


def test_datasample_spec_path_explicit_none():
with pytest.raises(TypeError):
DataSampleSpec(path=None, data_manager_keys=[str(uuid.uuid4())])

0 comments on commit 9f0e61d

Please sign in to comment.