Skip to content

Commit

Permalink
Add missing asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
danielballan committed Feb 8, 2024
1 parent 04a4157 commit 4ad90c1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tiled/_tests/test_asset_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ def test_include_data_sources_method_on_self(client):
with pytest.warns(UserWarning):
# This fetches the sources with an additional implicit request.
client["x"].data_sources()
client["x"].include_data_sources().data_sources() is not None
assert client["x"].include_data_sources().data_sources() is not None


def test_include_data_sources_method_affects_children(client):
"Calling include_data_sources() fetches data sources on children."
client.create_container("c")
client["c"].write_array([1, 2, 3], key="x")
c = client["c"].include_data_sources()
c["x"].data_sources() is not None
assert c["x"].data_sources() is not None


def test_include_data_sources_kwarg(context):
"Passing include_data_sources to constructor includes them by default."
client = from_context(context, include_data_sources=True)
client.write_array([1, 2, 3], key="x")
client["x"].data_sources() is not None
client["x"].include_data_sources() is not None
assert client["x"].data_sources() is not None
assert client["x"].include_data_sources() is not None


def test_raw_export(client, tmpdir):
Expand All @@ -65,5 +65,6 @@ def test_raw_export(client, tmpdir):


def test_get_asset_filepaths(client):
"Smoke test get_asset_filepaths."
client.write_array([1, 2, 3], key="x")
get_asset_filepaths(client.include_data_sources()["x"])

0 comments on commit 4ad90c1

Please sign in to comment.