From 65e96052ffcb1d878e459e5ed471d3c2467fc601 Mon Sep 17 00:00:00 2001 From: Steven Lim Date: Sat, 7 Nov 2020 20:08:14 -0800 Subject: [PATCH] Add ValueError test for tables.column method --- tests/test_tables.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_tables.py b/tests/test_tables.py index c61b3c72b..164cbd77d 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -141,6 +141,10 @@ def test_column(table): t = table assert_array_equal(t.column('letter'), np.array(['a', 'b', 'c', 'z'])) assert_array_equal(t.column(1), np.array([9, 3, 3, 1])) + with pytest.raises(ValueError): + t.column(-1) + with pytest.raises(ValueError): + t.column('abc') def test_basic_points(table):