From a0b2bc6667aa250bd379b6039581e8792b1ce4e1 Mon Sep 17 00:00:00 2001 From: add-itya Date: Sun, 11 Feb 2024 23:35:25 -0500 Subject: [PATCH] added functionality to check column entry types are consistent --- tests/test_tables.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/test_tables.py b/tests/test_tables.py index 267e0ae10..e1e5d5f2d 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -137,6 +137,12 @@ def test_basic(table): z | 1 | 10 """) +def test_column_types(table): + """Tests that the column types are correct.""" + t = table + for col_name in t.labels: + assert all(isinstance(item, (str, int)) for item in t[col_name]) + def test_column(table): """Test table.values()""" t = table