Skip to content

Commit

Permalink
Adds a test to check if an empty table is created from records if the…
Browse files Browse the repository at this point in the history
… records list is empty
  • Loading branch information
aad1tya committed Feb 11, 2023
1 parent 5c814c7 commit b499ba0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -1901,3 +1901,9 @@ def test_read_table():
assert isinstance(Table().read_table("tests/us-unemployment-copy"), Table)
assert isinstance(Table().read_table("tests/us-unemployment.txt"), Table)
assert isinstance(Table().read_table("https://raw.githubusercontent.com/data-8/textbook/main/assets/data/deflategate.csv"), Table)

def test_no_records():
"""Test that Table returns nothing on an empty record"""
empty_table = Table()
records_empty_table = Table().from_records([])
assert empty_table == records_empty_table

0 comments on commit b499ba0

Please sign in to comment.