From b46c57bf6f5bbaaa2e7a02483192e71d118c1277 Mon Sep 17 00:00:00 2001 From: ijlal haider Date: Mon, 7 Sep 2026 17:52:28 +0500 Subject: [PATCH] Add test coverage for Table._as_label ValueError branch --- tests/test_tables.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_tables.py b/tests/test_tables.py index 453e4ca8..a61613b9 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -147,6 +147,15 @@ def test_column(table): with pytest.raises(ValueError): t.column('abc') +def test_as_label(table): + """Test table._as_label()""" + t = table + assert t._as_label('letter') == 'letter' + assert t._as_label(0) == 'letter' + with pytest.raises(ValueError): + t._as_label(3.14) + + def test_values(): t1 = Table().with_columns({ 'row1': ['a', 'b', 'c'],