Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a test to check if an empty table is created from records if empty record list #582

Merged
merged 1 commit into from
Feb 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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