Skip to content

Commit

Permalink
added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoberon committed Mar 1, 2024
1 parent 1622675 commit 6890a51
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
4 changes: 2 additions & 2 deletions concepts/examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def load_dataset(name: str, data_src: typing.Optional[str] = DATASET_SOURCE,
Example:
>>> import concepts
>>> concepts.load_dataset('living_beings_and_water.cxt')
<Context object mapping 8 objects to 9 properties [b1e86589] at 0x...>
>>> concepts.load_dataset('livingbeings_en')
<Context object mapping 8 objects to 9 properties [e32693ba] at 0x...>
"""

url = f"{data_src}/{name}.cxt"
Expand Down
10 changes: 10 additions & 0 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import pytest

import concepts


def test_load_dataset():
context = concepts.load_dataset('livingbeings_en')

assert len(context.objects) == 8
assert len(context.properties) == 9

0 comments on commit 6890a51

Please sign in to comment.