Skip to content

Commit

Permalink
feat(examples): name examples tables according to example name
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud authored and jcrist committed Sep 14, 2023
1 parent 8d900ee commit 169d889
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ibis/examples/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def fetch(
name = self.name

if table_name is None:
table_name = ibis.util.gen_name(f"examples_{name}")
table_name = name

board = _get_board()

Expand Down
7 changes: 5 additions & 2 deletions ibis/examples/tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ def test_examples(example, example_con):

assert example in repr(ex)

df = ex.fetch(backend=example_con).limit(1).execute()
assert len(df) == 1
t = ex.fetch(backend=example_con)
assert t.op().name == example

n = t.limit(1).count().execute()
assert n == 1


def test_non_example():
Expand Down

0 comments on commit 169d889

Please sign in to comment.