From 169d889bdd12bc08ae9725d8e5629fad3b1cb7bd Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Thu, 14 Sep 2023 07:57:13 -0400 Subject: [PATCH] feat(examples): name examples tables according to example name --- ibis/examples/__init__.py | 2 +- ibis/examples/tests/test_examples.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ibis/examples/__init__.py b/ibis/examples/__init__.py index 7f72f2ee5c04..24d46aaf1345 100644 --- a/ibis/examples/__init__.py +++ b/ibis/examples/__init__.py @@ -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() diff --git a/ibis/examples/tests/test_examples.py b/ibis/examples/tests/test_examples.py index 5fcf82d15e77..b17da0ed3227 100644 --- a/ibis/examples/tests/test_examples.py +++ b/ibis/examples/tests/test_examples.py @@ -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():