Skip to content

Commit

Permalink
Wrote test for column_index and num_columns functions in tables.py (#596
Browse files Browse the repository at this point in the history
)

* Wrote test for column_index and num_columns functions in tables.py

---------

Co-authored-by: Burak Cakan <bcakan@xccelerated.io>
  • Loading branch information
BurakCakan and Burak Cakan committed Aug 23, 2023
1 parent ec3ebcd commit ca8a823
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_tables.py
Expand Up @@ -1938,3 +1938,13 @@ def test_no_records():
empty_table = Table()
records_empty_table = Table().from_records([])
assert empty_table == records_empty_table

def test_column_index(table):
"""Test that Tables returns right index number"""
index = table.column_index('letter')
assert index == 0

def test_num_columns(table):
"""Test that Tables returns right number of columns"""
number = table.num_columns
assert number == 3

0 comments on commit ca8a823

Please sign in to comment.